Examples#

This is the gallery of examples that showcase how scikit-learn can be used. Some examples demonstrate the use of the API in general and some demonstrate specific applications in tutorial form. Also check out our user guide for more detailed illustrations.

Release Highlights#

These examples illustrate the main features of the releases of scikit-learn.

BERJAYA

Release Highlights for scikit-learn 1.8

Release Highlights for scikit-learn 1.8
BERJAYA

Release Highlights for scikit-learn 1.7

Release Highlights for scikit-learn 1.7
BERJAYA

Release Highlights for scikit-learn 1.6

Release Highlights for scikit-learn 1.6
BERJAYA

Release Highlights for scikit-learn 1.5

Release Highlights for scikit-learn 1.5
BERJAYA

Release Highlights for scikit-learn 1.4

Release Highlights for scikit-learn 1.4
BERJAYA

Release Highlights for scikit-learn 1.3

Release Highlights for scikit-learn 1.3
BERJAYA

Release Highlights for scikit-learn 1.2

Release Highlights for scikit-learn 1.2
BERJAYA

Release Highlights for scikit-learn 1.1

Release Highlights for scikit-learn 1.1
BERJAYA

Release Highlights for scikit-learn 1.0

Release Highlights for scikit-learn 1.0
BERJAYA

Release Highlights for scikit-learn 0.24

Release Highlights for scikit-learn 0.24
BERJAYA

Release Highlights for scikit-learn 0.23

Release Highlights for scikit-learn 0.23
BERJAYA

Release Highlights for scikit-learn 0.22

Release Highlights for scikit-learn 0.22

Biclustering#

Examples concerning biclustering techniques.

BERJAYA

A demo of the Spectral Biclustering algorithm

A demo of the Spectral Biclustering algorithm
BERJAYA

A demo of the Spectral Co-Clustering algorithm

A demo of the Spectral Co-Clustering algorithm
BERJAYA

Biclustering documents with the Spectral Co-clustering algorithm

Biclustering documents with the Spectral Co-clustering algorithm

Calibration#

Examples illustrating the calibration of predicted probabilities of classifiers.

BERJAYA

Comparison of Calibration of Classifiers

Comparison of Calibration of Classifiers
BERJAYA

Probability Calibration curves

Probability Calibration curves
BERJAYA

Probability Calibration for 3-class classification

Probability Calibration for 3-class classification
BERJAYA

Probability calibration of classifiers

Probability calibration of classifiers

Classification#

General examples about classification algorithms.

BERJAYA

Classifier comparison

Classifier comparison
BERJAYA

Linear and Quadratic Discriminant Analysis with covariance ellipsoid

Linear and Quadratic Discriminant Analysis with covariance ellipsoid
BERJAYA

Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification

Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification
BERJAYA

Plot classification probability

Plot classification probability
BERJAYA

Recognizing hand-written digits

Recognizing hand-written digits

Clustering#

Examples concerning the sklearn.cluster module.

BERJAYA

A demo of K-Means clustering on the handwritten digits data

A demo of K-Means clustering on the handwritten digits data
BERJAYA

A demo of structured Ward hierarchical clustering on an image of coins

A demo of structured Ward hierarchical clustering on an image of coins
BERJAYA

A demo of the mean-shift clustering algorithm

A demo of the mean-shift clustering algorithm
BERJAYA

Adjustment for chance in clustering performance evaluation

Adjustment for chance in clustering performance evaluation
BERJAYA

Agglomerative clustering with different metrics

Agglomerative clustering with different metrics
BERJAYA

An example of K-Means++ initialization

An example of K-Means++ initialization
BERJAYA

Bisecting K-Means and Regular K-Means Performance Comparison

Bisecting K-Means and Regular K-Means Performance Comparison
BERJAYA

Compare BIRCH and MiniBatchKMeans

Compare BIRCH and MiniBatchKMeans
BERJAYA

Comparing different clustering algorithms on toy datasets

Comparing different clustering algorithms on toy datasets
BERJAYA

Comparing different hierarchical linkage methods on toy datasets

Comparing different hierarchical linkage methods on toy datasets
BERJAYA

Comparison of the K-Means and MiniBatchKMeans clustering algorithms

Comparison of the K-Means and MiniBatchKMeans clustering algorithms
BERJAYA

Demo of DBSCAN clustering algorithm

Demo of DBSCAN clustering algorithm
BERJAYA

Demo of HDBSCAN clustering algorithm

Demo of HDBSCAN clustering algorithm
BERJAYA

Demo of OPTICS clustering algorithm

Demo of OPTICS clustering algorithm
BERJAYA

Demo of affinity propagation clustering algorithm

Demo of affinity propagation clustering algorithm
BERJAYA

Demonstration of k-means assumptions

Demonstration of k-means assumptions
BERJAYA

Empirical evaluation of the impact of k-means initialization

Empirical evaluation of the impact of k-means initialization
BERJAYA

Feature agglomeration

Feature agglomeration
BERJAYA

Feature agglomeration vs. univariate selection

Feature agglomeration vs. univariate selection
BERJAYA

Hierarchical clustering with and without structure

Hierarchical clustering with and without structure
BERJAYA

Inductive Clustering

Inductive Clustering
BERJAYA

Online learning of a dictionary of parts of faces

Online learning of a dictionary of parts of faces
BERJAYA

Plot Hierarchical Clustering Dendrogram

Plot Hierarchical Clustering Dendrogram
BERJAYA

Segmenting the picture of greek coins in regions

Segmenting the picture of greek coins in regions
BERJAYA

Selecting the number of clusters with silhouette analysis on KMeans clustering

Selecting the number of clusters with silhouette analysis on KMeans clustering
BERJAYA

Spectral clustering for image segmentation

Spectral clustering for image segmentation
BERJAYA

Various Agglomerative Clustering on a 2D embedding of digits

Various Agglomerative Clustering on a 2D embedding of digits
BERJAYA

Vector Quantization Example

Vector Quantization Example

Covariance estimation#

Examples concerning the sklearn.covariance module.

BERJAYA

Ledoit-Wolf vs OAS estimation

Ledoit-Wolf vs OAS estimation
BERJAYA

Robust covariance estimation and Mahalanobis distances relevance

Robust covariance estimation and Mahalanobis distances relevance
BERJAYA

Robust vs Empirical covariance estimate

Robust vs Empirical covariance estimate
BERJAYA

Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood

Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood
BERJAYA

Sparse inverse covariance estimation

Sparse inverse covariance estimation

Cross decomposition#

Examples concerning the sklearn.cross_decomposition module.

BERJAYA

Compare cross decomposition methods

Compare cross decomposition methods
BERJAYA

Principal Component Regression vs Partial Least Squares Regression

Principal Component Regression vs Partial Least Squares Regression

Dataset examples#

Examples concerning the sklearn.datasets module.

BERJAYA

Plot randomly generated multilabel dataset

Plot randomly generated multilabel dataset

Decision Trees#

Examples concerning the sklearn.tree module.

BERJAYA

Decision Tree Regression

Decision Tree Regression
BERJAYA

Plot the decision surface of decision trees trained on the iris dataset

Plot the decision surface of decision trees trained on the iris dataset
BERJAYA

Post pruning decision trees with cost complexity pruning

Post pruning decision trees with cost complexity pruning
BERJAYA

Understanding the decision tree structure

Understanding the decision tree structure

Decomposition#

Examples concerning the sklearn.decomposition module.

BERJAYA

Blind source separation using FastICA

Blind source separation using FastICA
BERJAYA

Comparison of LDA and PCA 2D projection of Iris dataset

Comparison of LDA and PCA 2D projection of Iris dataset
BERJAYA

Faces dataset decompositions

Faces dataset decompositions
BERJAYA

Factor Analysis (with rotation) to visualize patterns

Factor Analysis (with rotation) to visualize patterns
BERJAYA

FastICA on 2D point clouds

FastICA on 2D point clouds
BERJAYA

Image denoising using dictionary learning

Image denoising using dictionary learning
BERJAYA

Incremental PCA

Incremental PCA
BERJAYA

Kernel PCA

Kernel PCA
BERJAYA

Model selection with Probabilistic PCA and Factor Analysis (FA)

Model selection with Probabilistic PCA and Factor Analysis (FA)
BERJAYA

Principal Component Analysis (PCA) on Iris Dataset

Principal Component Analysis (PCA) on Iris Dataset
BERJAYA

Sparse coding with a precomputed dictionary

Sparse coding with a precomputed dictionary

Developing Estimators#

Examples concerning the development of Custom Estimator.

BERJAYA

__sklearn_is_fitted__ as Developer API

__sklearn_is_fitted__ as Developer API

Ensemble methods#

Examples concerning the sklearn.ensemble module.

BERJAYA

Categorical Feature Support in Gradient Boosting

Categorical Feature Support in Gradient Boosting
BERJAYA

Combine predictors using stacking

Combine predictors using stacking
BERJAYA

Comparing Random Forests and Histogram Gradient Boosting models

Comparing Random Forests and Histogram Gradient Boosting models
BERJAYA

Comparing random forests and the multi-output meta estimator

Comparing random forests and the multi-output meta estimator
BERJAYA

Decision Tree Regression with AdaBoost

Decision Tree Regression with AdaBoost
BERJAYA

Early stopping in Gradient Boosting

Early stopping in Gradient Boosting
BERJAYA

Feature importances with a forest of trees

Feature importances with a forest of trees
BERJAYA

Feature transformations with ensembles of trees

Feature transformations with ensembles of trees
BERJAYA

Features in Histogram Gradient Boosting Trees

Features in Histogram Gradient Boosting Trees
BERJAYA

Gradient Boosting Out-of-Bag estimates

Gradient Boosting Out-of-Bag estimates
BERJAYA

Gradient Boosting regression

Gradient Boosting regression
BERJAYA

Gradient Boosting regularization

Gradient Boosting regularization
BERJAYA

Hashing feature transformation using Totally Random Trees

Hashing feature transformation using Totally Random Trees
BERJAYA

IsolationForest example

IsolationForest example
BERJAYA

Monotonic Constraints

Monotonic Constraints
BERJAYA

Multi-class AdaBoosted Decision Trees

Multi-class AdaBoosted Decision Trees
BERJAYA

OOB Errors for Random Forests

OOB Errors for Random Forests
BERJAYA

Plot individual and voting regression predictions

Plot individual and voting regression predictions
BERJAYA

Plot the decision surfaces of ensembles of trees on the iris dataset

Plot the decision surfaces of ensembles of trees on the iris dataset
BERJAYA

Prediction Intervals for Gradient Boosting Regression

Prediction Intervals for Gradient Boosting Regression
BERJAYA

Single estimator versus bagging: bias-variance decomposition

Single estimator versus bagging: bias-variance decomposition
BERJAYA

Two-class AdaBoost

Two-class AdaBoost
BERJAYA

Visualizing the probabilistic predictions of a VotingClassifier

Visualizing the probabilistic predictions of a VotingClassifier

Examples based on real world datasets#

Applications to real world problems with some medium sized datasets or interactive user interface.

BERJAYA

Compressive sensing: tomography reconstruction with L1 prior (Lasso)

Compressive sensing: tomography reconstruction with L1 prior (Lasso)
BERJAYA

Faces recognition example using eigenfaces and SVMs

Faces recognition example using eigenfaces and SVMs
BERJAYA

Image denoising using kernel PCA

Image denoising using kernel PCA
BERJAYA

Lagged features for time series forecasting

Lagged features for time series forecasting
BERJAYA

Model Complexity Influence

Model Complexity Influence
BERJAYA

Out-of-core classification of text documents

Out-of-core classification of text documents
BERJAYA

Outlier detection on a real data set

Outlier detection on a real data set
BERJAYA

Prediction Latency

Prediction Latency
BERJAYA

Species distribution modeling

Species distribution modeling
BERJAYA

Time-related feature engineering

Time-related feature engineering
BERJAYA

Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation

Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation
BERJAYA

Visualizing the stock market structure

Visualizing the stock market structure
BERJAYA

Wikipedia principal eigenvector

Wikipedia principal eigenvector

Feature Selection#

Examples concerning the sklearn.feature_selection module.

BERJAYA

Comparison of F-test and mutual information

Comparison of F-test and mutual information
BERJAYA

Model-based and sequential feature selection

Model-based and sequential feature selection
BERJAYA

Pipeline ANOVA SVM

Pipeline ANOVA SVM
BERJAYA

Recursive feature elimination

Recursive feature elimination
BERJAYA

Recursive feature elimination with cross-validation

Recursive feature elimination with cross-validation
BERJAYA

Univariate Feature Selection

Univariate Feature Selection

Frozen Estimators#

Examples concerning the sklearn.frozen module.

BERJAYA

Examples of Using FrozenEstimator

Examples of Using FrozenEstimator

Gaussian Mixture Models#

Examples concerning the sklearn.mixture module.

BERJAYA

Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture

Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture
BERJAYA

Density Estimation for a Gaussian mixture

Density Estimation for a Gaussian mixture
BERJAYA

GMM Initialization Methods

GMM Initialization Methods
BERJAYA

GMM covariances

GMM covariances
BERJAYA

Gaussian Mixture Model Ellipsoids

Gaussian Mixture Model Ellipsoids
BERJAYA

Gaussian Mixture Model Selection

Gaussian Mixture Model Selection
BERJAYA

Gaussian Mixture Model Sine Curve

Gaussian Mixture Model Sine Curve

Gaussian Process for Machine Learning#

Examples concerning the sklearn.gaussian_process module.

BERJAYA

Ability of Gaussian process regression (GPR) to estimate data noise-level

Ability of Gaussian process regression (GPR) to estimate data noise-level
BERJAYA

Comparison of kernel ridge and Gaussian process regression

Comparison of kernel ridge and Gaussian process regression
BERJAYA

Forecasting of CO2 level on Mona Loa dataset using Gaussian process regression (GPR)

Forecasting of CO2 level on Mona Loa dataset using Gaussian process regression (GPR)
BERJAYA

Gaussian Processes regression: basic introductory example

Gaussian Processes regression: basic introductory example
BERJAYA

Gaussian process classification (GPC) on iris dataset

Gaussian process classification (GPC) on iris dataset
BERJAYA

Gaussian processes on discrete data structures

Gaussian processes on discrete data structures
BERJAYA

Illustration of Gaussian process classification (GPC) on the XOR dataset

Illustration of Gaussian process classification (GPC) on the XOR dataset
BERJAYA

Illustration of prior and posterior Gaussian process for different kernels

Illustration of prior and posterior Gaussian process for different kernels
BERJAYA

Iso-probability lines for Gaussian Processes classification (GPC)

Iso-probability lines for Gaussian Processes classification (GPC)
BERJAYA

Probabilistic predictions with Gaussian process classification (GPC)

Probabilistic predictions with Gaussian process classification (GPC)

Generalized Linear Models#

Examples concerning the sklearn.linear_model module.

BERJAYA

Comparing Linear Bayesian Regressors

Comparing Linear Bayesian Regressors
BERJAYA

Curve Fitting with Bayesian Ridge Regression

Curve Fitting with Bayesian Ridge Regression
BERJAYA

Decision Boundaries of Multinomial and One-vs-Rest Logistic Regression

Decision Boundaries of Multinomial and One-vs-Rest Logistic Regression
BERJAYA

Early stopping of Stochastic Gradient Descent

Early stopping of Stochastic Gradient Descent
BERJAYA

Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples

Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples
BERJAYA

HuberRegressor vs Ridge on dataset with strong outliers

HuberRegressor vs Ridge on dataset with strong outliers
BERJAYA

Joint feature selection with multi-task Lasso

Joint feature selection with multi-task Lasso
BERJAYA

L1 Penalty and Sparsity in Logistic Regression

L1 Penalty and Sparsity in Logistic Regression
BERJAYA

L1-based models for Sparse Signals

L1-based models for Sparse Signals
BERJAYA

Lasso model selection via information criteria

Lasso model selection via information criteria
BERJAYA

Lasso model selection: AIC-BIC / cross-validation

Lasso model selection: AIC-BIC / cross-validation
BERJAYA

Lasso on dense and sparse data

Lasso on dense and sparse data
BERJAYA

Lasso, Lasso-LARS, and Elastic Net paths

Lasso, Lasso-LARS, and Elastic Net paths
BERJAYA

MNIST classification using multinomial logistic + L1

MNIST classification using multinomial logistic + L1
BERJAYA

Multiclass sparse logistic regression on 20newgroups

Multiclass sparse logistic regression on 20newgroups
BERJAYA

Non-negative least squares

Non-negative least squares
BERJAYA

One-Class SVM versus One-Class SVM using Stochastic Gradient Descent

One-Class SVM versus One-Class SVM using Stochastic Gradient Descent
BERJAYA

Ordinary Least Squares and Ridge Regression

Ordinary Least Squares and Ridge Regression
BERJAYA

Orthogonal Matching Pursuit

Orthogonal Matching Pursuit
BERJAYA

Plot Ridge coefficients as a function of the regularization

Plot Ridge coefficients as a function of the regularization
BERJAYA

Plot multi-class SGD on the iris dataset

Plot multi-class SGD on the iris dataset
BERJAYA

Poisson regression and non-normal loss

Poisson regression and non-normal loss
BERJAYA

Polynomial and Spline interpolation

Polynomial and Spline interpolation
BERJAYA

Quantile regression

Quantile regression
BERJAYA

Regularization path of L1- Logistic Regression

Regularization path of L1- Logistic Regression
BERJAYA

Ridge coefficients as a function of the L2 Regularization

Ridge coefficients as a function of the L2 Regularization
BERJAYA

Robust linear estimator fitting

Robust linear estimator fitting
BERJAYA

Robust linear model estimation using RANSAC

Robust linear model estimation using RANSAC
BERJAYA

SGD: Maximum margin separating hyperplane

SGD: Maximum margin separating hyperplane
BERJAYA

SGD: Penalties

SGD: Penalties
BERJAYA

SGD: Weighted samples

SGD: Weighted samples
BERJAYA

SGD: convex loss functions

SGD: convex loss functions
BERJAYA

Theil-Sen Regression

Theil-Sen Regression
BERJAYA

Tweedie regression on insurance claims

Tweedie regression on insurance claims

Inspection#

Examples related to the sklearn.inspection module.

BERJAYA

Common pitfalls in the interpretation of coefficients of linear models

Common pitfalls in the interpretation of coefficients of linear models
BERJAYA

Failure of Machine Learning to infer causal effects

Failure of Machine Learning to infer causal effects
BERJAYA

Partial Dependence and Individual Conditional Expectation Plots

Partial Dependence and Individual Conditional Expectation Plots
BERJAYA

Permutation Importance vs Random Forest Feature Importance (MDI)

Permutation Importance vs Random Forest Feature Importance (MDI)
BERJAYA

Permutation Importance with Multicollinear or Correlated Features

Permutation Importance with Multicollinear or Correlated Features

Kernel Approximation#

Examples concerning the sklearn.kernel_approximation module.

BERJAYA

Scalable learning with polynomial kernel approximation

Scalable learning with polynomial kernel approximation

Manifold learning#

Examples concerning the sklearn.manifold module.

BERJAYA

Comparison of Manifold Learning methods

Comparison of Manifold Learning methods
BERJAYA

Manifold Learning methods on a severed sphere

Manifold Learning methods on a severed sphere
BERJAYA

Manifold learning on handwritten digits: Locally Linear Embedding, Isomap…

Manifold learning on handwritten digits: Locally Linear Embedding, Isomap...
BERJAYA

Multi-dimensional scaling

Multi-dimensional scaling
BERJAYA

Swiss Roll And Swiss-Hole Reduction

Swiss Roll And Swiss-Hole Reduction
BERJAYA

t-SNE: The effect of various perplexity values on the shape

t-SNE: The effect of various perplexity values on the shape

Miscellaneous#

Miscellaneous and introductory examples for scikit-learn.

BERJAYA

Advanced Plotting With Partial Dependence

Advanced Plotting With Partial Dependence
BERJAYA

Comparing anomaly detection algorithms for outlier detection on toy datasets

Comparing anomaly detection algorithms for outlier detection on toy datasets
BERJAYA

Comparison of kernel ridge regression and SVR

Comparison of kernel ridge regression and SVR
BERJAYA

Displaying Pipelines

Displaying Pipelines
BERJAYA

Displaying estimators and complex pipelines

Displaying estimators and complex pipelines
BERJAYA

Evaluation of outlier detection estimators

Evaluation of outlier detection estimators
BERJAYA

Explicit feature map approximation for RBF kernels

Explicit feature map approximation for RBF kernels
BERJAYA

Face completion with a multi-output estimators

Face completion with a multi-output estimators
BERJAYA

Introducing the set_output API

Introducing the set_output API
BERJAYA

Isotonic Regression

Isotonic Regression
BERJAYA

Metadata Routing

Metadata Routing
BERJAYA

Multilabel classification

Multilabel classification
BERJAYA

ROC Curve with Visualization API

ROC Curve with Visualization API
BERJAYA

The Johnson-Lindenstrauss bound for embedding with random projections

The Johnson-Lindenstrauss bound for embedding with random projections
BERJAYA

Visualizations with Display Objects

Visualizations with Display Objects

Missing Value Imputation#

Examples concerning the sklearn.impute module.

BERJAYA

Imputing missing values before building an estimator

Imputing missing values before building an estimator
BERJAYA

Imputing missing values with variants of IterativeImputer

Imputing missing values with variants of IterativeImputer

Model Selection#

Examples related to the sklearn.model_selection module.

BERJAYA

Balance model complexity and cross-validated score

Balance model complexity and cross-validated score
BERJAYA

Class Likelihood Ratios to measure classification performance

Class Likelihood Ratios to measure classification performance
BERJAYA

Comparing randomized search and grid search for hyperparameter estimation

Comparing randomized search and grid search for hyperparameter estimation
BERJAYA

Comparison between grid search and successive halving

Comparison between grid search and successive halving
BERJAYA

Custom refit strategy of a grid search with cross-validation

Custom refit strategy of a grid search with cross-validation
BERJAYA

Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV

Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV
BERJAYA

Detection error tradeoff (DET) curve

Detection error tradeoff (DET) curve
BERJAYA

Effect of model regularization on training and test error

Effect of model regularization on training and test error
BERJAYA

Evaluate the performance of a classifier with Confusion Matrix

Evaluate the performance of a classifier with Confusion Matrix
BERJAYA

Multiclass Receiver Operating Characteristic (ROC)

Multiclass Receiver Operating Characteristic (ROC)
BERJAYA

Nested versus non-nested cross-validation

Nested versus non-nested cross-validation
BERJAYA

Plotting Cross-Validated Predictions

Plotting Cross-Validated Predictions
BERJAYA

Plotting Learning Curves and Checking Models’ Scalability

Plotting Learning Curves and Checking Models' Scalability
BERJAYA

Post-hoc tuning the cut-off point of decision function

Post-hoc tuning the cut-off point of decision function
BERJAYA

Post-tuning the decision threshold for cost-sensitive learning

Post-tuning the decision threshold for cost-sensitive learning
BERJAYA

Precision-Recall

Precision-Recall
BERJAYA

Receiver Operating Characteristic (ROC) with cross validation

Receiver Operating Characteristic (ROC) with cross validation
BERJAYA

Sample pipeline for text feature extraction and evaluation

Sample pipeline for text feature extraction and evaluation
BERJAYA

Statistical comparison of models using grid search

Statistical comparison of models using grid search
BERJAYA

Successive Halving Iterations

Successive Halving Iterations
BERJAYA

Test with permutations the significance of a classification score

Test with permutations the significance of a classification score
BERJAYA

Underfitting vs. Overfitting

Underfitting vs. Overfitting
BERJAYA

Visualizing cross-validation behavior in scikit-learn

Visualizing cross-validation behavior in scikit-learn

Multiclass methods#

Examples concerning the sklearn.multiclass module.

BERJAYA

Overview of multiclass training meta-estimators

Overview of multiclass training meta-estimators

Multioutput methods#

Examples concerning the sklearn.multioutput module.

BERJAYA

Multilabel classification using a classifier chain

Multilabel classification using a classifier chain

Nearest Neighbors#

Examples concerning the sklearn.neighbors module.

BERJAYA

Approximate nearest neighbors in TSNE

Approximate nearest neighbors in TSNE
BERJAYA

Caching nearest neighbors

Caching nearest neighbors
BERJAYA

Comparing Nearest Neighbors with and without Neighborhood Components Analysis

Comparing Nearest Neighbors with and without Neighborhood Components Analysis
BERJAYA

Dimensionality Reduction with Neighborhood Components Analysis

Dimensionality Reduction with Neighborhood Components Analysis
BERJAYA

Kernel Density Estimate of Species Distributions

Kernel Density Estimate of Species Distributions
BERJAYA

Kernel Density Estimation

Kernel Density Estimation
BERJAYA

Nearest Centroid Classification

Nearest Centroid Classification
BERJAYA

Nearest Neighbors Classification

Nearest Neighbors Classification
BERJAYA

Nearest Neighbors regression

Nearest Neighbors regression
BERJAYA

Neighborhood Components Analysis Illustration

Neighborhood Components Analysis Illustration
BERJAYA

Novelty detection with Local Outlier Factor (LOF)

Novelty detection with Local Outlier Factor (LOF)
BERJAYA

Outlier detection with Local Outlier Factor (LOF)

Outlier detection with Local Outlier Factor (LOF)
BERJAYA

Simple 1D Kernel Density Estimation

Simple 1D Kernel Density Estimation

Neural Networks#

Examples concerning the sklearn.neural_network module.

BERJAYA

Compare Stochastic learning strategies for MLPClassifier

Compare Stochastic learning strategies for MLPClassifier
BERJAYA

Restricted Boltzmann Machine features for digit classification

Restricted Boltzmann Machine features for digit classification
BERJAYA

Varying regularization in Multi-layer Perceptron

Varying regularization in Multi-layer Perceptron
BERJAYA

Visualization of MLP weights on MNIST

Visualization of MLP weights on MNIST

Pipelines and composite estimators#

Examples of how to compose transformers and pipelines from other estimators. See the User Guide.

BERJAYA

Column Transformer with Heterogeneous Data Sources

Column Transformer with Heterogeneous Data Sources
BERJAYA

Column Transformer with Mixed Types

Column Transformer with Mixed Types
BERJAYA

Concatenating multiple feature extraction methods

Concatenating multiple feature extraction methods
BERJAYA

Effect of transforming the targets in regression model

Effect of transforming the targets in regression model
BERJAYA

Pipelining: chaining a PCA and a logistic regression

Pipelining: chaining a PCA and a logistic regression
BERJAYA

Selecting dimensionality reduction with Pipeline and GridSearchCV

Selecting dimensionality reduction with Pipeline and GridSearchCV

Preprocessing#

Examples concerning the sklearn.preprocessing module.

BERJAYA

Compare the effect of different scalers on data with outliers

Compare the effect of different scalers on data with outliers
BERJAYA

Comparing Target Encoder with Other Encoders

Comparing Target Encoder with Other Encoders
BERJAYA

Demonstrating the different strategies of KBinsDiscretizer

Demonstrating the different strategies of KBinsDiscretizer
BERJAYA

Feature discretization

Feature discretization
BERJAYA

Importance of Feature Scaling

Importance of Feature Scaling
BERJAYA

Map data to a normal distribution

Map data to a normal distribution
BERJAYA

Target Encoder’s Internal Cross fitting

Target Encoder's Internal Cross fitting
BERJAYA

Using KBinsDiscretizer to discretize continuous features

Using KBinsDiscretizer to discretize continuous features

Semi Supervised Classification#

Examples concerning the sklearn.semi_supervised module.

BERJAYA

Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset

Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset
BERJAYA

Effect of varying threshold for self-training

Effect of varying threshold for self-training
BERJAYA

Label Propagation circles: Learning a complex structure

Label Propagation circles: Learning a complex structure
BERJAYA

Label Propagation digits: Active learning

Label Propagation digits: Active learning
BERJAYA

Label Propagation digits: Demonstrating performance

Label Propagation digits: Demonstrating performance
BERJAYA

Semi-supervised Classification on a Text Dataset

Semi-supervised Classification on a Text Dataset

Support Vector Machines#

Examples concerning the sklearn.svm module.

BERJAYA

One-class SVM with non-linear kernel (RBF)

One-class SVM with non-linear kernel (RBF)
BERJAYA

Plot classification boundaries with different SVM Kernels

Plot classification boundaries with different SVM Kernels
BERJAYA

Plot different SVM classifiers in the iris dataset

Plot different SVM classifiers in the iris dataset
BERJAYA

Plot the support vectors in LinearSVC

Plot the support vectors in LinearSVC
BERJAYA

RBF SVM parameters

RBF SVM parameters
BERJAYA

SVM Margins Example

SVM Margins Example
BERJAYA

SVM Tie Breaking Example

SVM Tie Breaking Example
BERJAYA

SVM with custom kernel

SVM with custom kernel
BERJAYA

SVM-Anova: SVM with univariate feature selection

SVM-Anova: SVM with univariate feature selection
BERJAYA

SVM: Maximum margin separating hyperplane

SVM: Maximum margin separating hyperplane
BERJAYA

SVM: Separating hyperplane for unbalanced classes

SVM: Separating hyperplane for unbalanced classes
BERJAYA

SVM: Weighted samples

SVM: Weighted samples
BERJAYA

Scaling the regularization parameter for SVCs

Scaling the regularization parameter for SVCs
BERJAYA

Support Vector Regression (SVR) using linear and non-linear kernels

Support Vector Regression (SVR) using linear and non-linear kernels

Working with text documents#

Examples concerning the sklearn.feature_extraction.text module.

BERJAYA

Classification of text documents using sparse features

Classification of text documents using sparse features
BERJAYA

Clustering text documents using k-means

Clustering text documents using k-means
BERJAYA

FeatureHasher and DictVectorizer Comparison

FeatureHasher and DictVectorizer Comparison

Gallery generated by Sphinx-Gallery