regularization / usage.md
nanye's picture
- allow user-specified range of regularization strengths
ae86659
|
Raw History Blame Contribute Delete
1.37 kB

A newer version of the Gradio SDK is available: 6.31.0

Upgrade

Usage

In this visualizer, you visualize the loss and regularization of linear regression models on a given dataset.


Data

In the data tab, select a predefined regression dataset, or choose Custom to generate a dataset using a custom function or upload a CSV file. Predefined datasets have standardized covariates and a centered target. Make sure the function depends on x1 and x2.

Regularization

Select your loss function and regularization type. Set the regularization level range as two comma-separated values (for example, 0.001, 50).

Generating plots

Click Regenerate Plots to update plots with the current settings


Contour Plot

The contour plot shows the loss values and the regularization norms for the linear models on the dataset. The red path shows how the loss and regularization norm values change across the selected regularization level range. You can see that the path intersects where the loss and regularization contours are parallel.

Data Plot

The data plot shows the data points used to compute the loss values.

Regularization path plot

The regularization path plot shows regularization strength versus coefficient value for every covariate. Datasets with more than two covariates show only this plot. These match the values shown on the red regularization path in the contour plot.