Lasso on dense and sparse data
  • References/Python/scikit-learn/Examples/Generalized Linear Models

We show that linear_model.Lasso provides the same results for dense and sparse data and that in the case of sparse data the speed is improved.

2025-01-10 15:47:30
Density Estimation for a Gaussian mixture
  • References/Python/scikit-learn/Examples/Gaussian Mixture Models

Plot the density estimation of a mixture of two Gaussians. Data is generated from two Gaussians with different centers and covariance matrices.

2025-01-10 15:47:30
L1 Penalty and Sparsity in Logistic Regression
  • References/Python/scikit-learn/Examples/Generalized Linear Models

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

2025-01-10 15:47:30
Clustering text documents using k-means
  • References/Python/scikit-learn/Examples/Working with text documents

This is an example showing how the scikit-learn can be used to cluster documents by topics using a bag-of-words approach. This example uses a scipy.sparse

2025-01-10 15:47:30
Feature transformations with ensembles of trees
  • References/Python/scikit-learn/Examples/Ensemble methods

Transform your features into a higher dimensional, sparse space. Then train a linear model on these features. First fit an ensemble of

2025-01-10 15:47:30
Plotting Cross-Validated Predictions
  • References/Python/scikit-learn/Examples/General examples

This example shows how to use cross_val_predict to visualize prediction errors.

2025-01-10 15:47:30
Concatenating multiple feature extraction methods
  • References/Python/scikit-learn/Examples/General examples

In many real-world examples, there are many ways to extract features from a dataset. Often it is beneficial to combine several methods to obtain

2025-01-10 15:47:30
Kernel PCA
  • References/Python/scikit-learn/Examples/Decomposition

This example shows that Kernel PCA is able to find a projection of the data that makes data linearly separable.

2025-01-10 15:47:30
SGD: Weighted samples
  • References/Python/scikit-learn/Examples/Generalized Linear Models

Plot decision function of a weighted dataset, where the size of points is proportional to its weight.

2025-01-10 15:47:30
Plot randomly generated multilabel dataset
  • References/Python/scikit-learn/Examples/Dataset examples

This illustrates the datasets.make_multilabel_classification dataset generator. Each sample consists of counts of two features (up to

2025-01-10 15:47:30