This example uses the only the first feature of the diabetes dataset, in order to illustrate a two-dimensional plot of this regression technique. The
Comparison of the sparsity (percentage of zero coefficients) of solutions when L1 and L2 penalty are used for different values of C. We can see
Use the Akaike information criterion (AIC), the Bayes Information criterion (BIC) and cross-validation to select an optimal value of the regularization
Plot decision function of a weighted dataset, where the size of points is proportional to its weight.
This example demonstrates how to approximate a function with a polynomial of degree n_degree by using ridge regression. Concretely, from n_samples 1d points, it suffices
Features 1 and 2 of the diabetes-dataset are fitted and plotted below. It illustrates that although feature 2 has a strong coefficient on the
Here a sine function is fit with a polynomial of order 3, for values close to zero. Robust fitting is demoed in different situations: No
Show below is a logistic-regression classifiers decision boundaries on the
Computes a Bayesian Ridge Regression on a synthetic dataset. See
Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent. The coefficients can be forced to be positive.
Page 3 of 4