User guide: contents
- 1. Installing scikit-learn
- 2. Tutorials: From the bottom up with scikit-learn
- 2.1. An Introduction to machine learning with scikit-learn
- 2.2. Scikit-learn tutorial: statistical-learning for sientific data processing
- 1. Statistical learning: the setting and the estimator object in the scikit-learn
- 2. Supervised learning: predicting an output variable from high-dimensional observations
- 3. Model selection: choosing estimators and their parameters
- 4. Unsupervised learning: seeking representations of the data
- 5. Putting it all together
- 6. Finding help
- 2.3. Using scikit-learn with Astronomical Data
- 2.3.1. Astronomy Tutorial setup
- 2.3.2. Machine Learning 101: General Concepts
- 2.3.3. Machine Learning 102: Practical Advice
- 2.3.4. Classification: Learning Labels of Astronomical Sources
- 2.3.5. Regression: Photometric Redshifts of Galaxies
- 2.3.6. Dimensionality Reduction of Astronomical Spectra
- 2.3.7. Exercises: Taking it a step further
- 2.4. Machine Learning for Text Analytics with scikit-learn
- 2.4.1. Tutorial setup
- 2.4.2. Machine Learning 101: General Concepts
- 2.4.3. Working with text data
- 2.4.4. Exercises
- 2.4.5. How to select the right algorithm for the task
- 2.4.6. Finding help
- 3. Supervised learning
- 3.1. Generalized Linear Models
- 3.2. Support Vector Machines
- 3.3. Stochastic Gradient Descent
- 3.4. Nearest Neighbors
- 3.5. Gaussian Processes
- 3.6. Partial Least Squares
- 3.7. Naive Bayes
- 3.8. Decision Trees
- 3.9. Ensemble methods
- 3.10. Multiclass and multilabel algorithms
- 3.11. Feature selection
- 3.12. Semi-Supervised
- 3.13. Linear and Quadratic Discriminant Analysis
- 4. Unsupervised learning
- 4.1. Gaussian mixture models
- 4.2. Manifold learning
- 4.3. Clustering
- 4.3.1. K-means
- 4.3.2. Affinity propagation
- 4.3.3. Mean Shift
- 4.3.4. Spectral clustering
- 4.3.5. Hierarchical clustering
- 4.3.6. DBSCAN
- 4.3.7. Clustering performance evaluation
- 4.4. Decomposing signals in components (matrix factorization problems)
- 4.5. Covariance estimation
- 4.6. Novelty and Outlier Detection
- 4.7. Hidden Markov Models
- 5. Model Selection
- 5.1. Cross-Validation
- 5.2. Grid Search
- 6. Dataset transformations
- 7. Dataset loading utilities
- 7.1. General dataset API
- 7.2. Toy datasets
- 7.3. Sample images
- 7.4. Sample generators
- 7.5. Datasets in svmlight / libsvm format
- 7.6. The Olivetti faces dataset
- 7.7. The 20 newsgroups text dataset
- 7.8. Downloading datasets from the mldata.org repository
- 7.9. The Labeled Faces in the Wild face recognition dataset
- 8. Reference
- 8.1. sklearn.cluster: Clustering
- 8.2. sklearn.covariance: Covariance Estimators
- 8.2.1. sklearn.covariance.EmpiricalCovariance
- 8.2.2. sklearn.covariance.ShrunkCovariance
- 8.2.3. sklearn.covariance.LedoitWolf
- 8.2.4. sklearn.covariance.OAS
- 8.2.5. sklearn.covariance.GraphLasso
- 8.2.6. sklearn.covariance.GraphLassoCV
- 8.2.7. sklearn.covariance.MinCovDet
- 8.2.8. sklearn.covariance.empirical_covariance
- 8.2.9. sklearn.covariance.ledoit_wolf
- 8.2.10. sklearn.covariance.shrunk_covariance
- 8.2.11. sklearn.covariance.oas
- 8.2.12. sklearn.covariance.graph_lasso
- 8.3. sklearn.cross_validation: Cross Validation
- 8.3.1. sklearn.cross_validation.Bootstrap
- 8.3.2. sklearn.cross_validation.KFold
- 8.3.3. sklearn.cross_validation.LeaveOneLabelOut
- 8.3.4. sklearn.cross_validation.LeaveOneOut
- 8.3.5. sklearn.cross_validation.LeavePLabelOut
- 8.3.6. sklearn.cross_validation.LeavePOut
- 8.3.7. sklearn.cross_validation.StratifiedKFold
- 8.3.8. sklearn.cross_validation.ShuffleSplit
- 8.3.9. sklearn.cross_validation.train_test_split
- 8.3.10. sklearn.cross_validation.cross_val_score
- 8.3.11. sklearn.cross_validation.permutation_test_score
- 8.3.12. sklearn.cross_validation.check_cv
- 8.4. sklearn.datasets: Datasets
- 8.4.1. Loaders
- 8.4.1.1. sklearn.datasets.load_20newsgroups
- 8.4.1.2. sklearn.datasets.fetch_20newsgroups
- 8.4.1.3. sklearn.datasets.fetch_20newsgroups_vectorized
- 8.4.1.4. sklearn.datasets.load_boston
- 8.4.1.5. sklearn.datasets.load_diabetes
- 8.4.1.6. sklearn.datasets.load_digits
- 8.4.1.7. sklearn.datasets.load_files
- 8.4.1.8. sklearn.datasets.load_iris
- 8.4.1.9. sklearn.datasets.load_lfw_pairs
- 8.4.1.10. sklearn.datasets.fetch_lfw_pairs
- 8.4.1.11. sklearn.datasets.load_lfw_people
- 8.4.1.12. sklearn.datasets.fetch_lfw_people
- 8.4.1.13. sklearn.datasets.load_linnerud
- 8.4.1.14. sklearn.datasets.fetch_olivetti_faces
- 8.4.1.15. sklearn.datasets.load_sample_image
- 8.4.1.16. sklearn.datasets.load_sample_images
- 8.4.1.17. sklearn.datasets.load_svmlight_file
- 8.4.2. Samples generator
- 8.4.2.1. sklearn.datasets.make_blobs
- 8.4.2.2. sklearn.datasets.make_classification
- 8.4.2.3. sklearn.datasets.make_circles
- 8.4.2.4. sklearn.datasets.make_friedman1
- 8.4.2.5. sklearn.datasets.make_friedman2
- 8.4.2.6. sklearn.datasets.make_friedman3
- 8.4.2.7. sklearn.datasets.make_low_rank_matrix
- 8.4.2.8. sklearn.datasets.make_moons
- 8.4.2.9. sklearn.datasets.make_multilabel_classification
- 8.4.2.10. sklearn.datasets.make_regression
- 8.4.2.11. sklearn.datasets.make_s_curve
- 8.4.2.12. sklearn.datasets.make_sparse_coded_signal
- 8.4.2.13. sklearn.datasets.make_sparse_spd_matrix
- 8.4.2.14. sklearn.datasets.make_sparse_uncorrelated
- 8.4.2.15. sklearn.datasets.make_spd_matrix
- 8.4.2.16. sklearn.datasets.make_swiss_roll
- 8.4.1. Loaders
- 8.5. sklearn.decomposition: Matrix Decomposition
- 8.5.1. sklearn.decomposition.PCA
- 8.5.2. sklearn.decomposition.ProbabilisticPCA
- 8.5.3. sklearn.decomposition.ProjectedGradientNMF
- 8.5.4. sklearn.decomposition.RandomizedPCA
- 8.5.5. sklearn.decomposition.KernelPCA
- 8.5.6. sklearn.decomposition.FastICA
- 8.5.7. sklearn.decomposition.NMF
- 8.5.8. sklearn.decomposition.SparsePCA
- 8.5.9. sklearn.decomposition.MiniBatchSparsePCA
- 8.5.10. sklearn.decomposition.SparseCoder
- 8.5.11. sklearn.decomposition.DictionaryLearning
- 8.5.12. sklearn.decomposition.MiniBatchDictionaryLearning
- 8.5.13. sklearn.decomposition.fastica
- 8.5.14. sklearn.decomposition.dict_learning
- 8.5.15. sklearn.decomposition.dict_learning_online
- 8.5.16. sklearn.decomposition.sparse_encode
- 8.6. sklearn.ensemble: Ensemble Methods
- 8.7. sklearn.feature_extraction: Feature Extraction
- 8.8. sklearn.feature_selection: Feature Selection
- 8.8.1. sklearn.feature_selection.SelectPercentile
- 8.8.2. sklearn.feature_selection.SelectKBest
- 8.8.3. sklearn.feature_selection.SelectFpr
- 8.8.4. sklearn.feature_selection.SelectFdr
- 8.8.5. sklearn.feature_selection.SelectFwe
- 8.8.6. sklearn.feature_selection.RFE
- 8.8.7. sklearn.feature_selection.RFECV
- 8.8.8. sklearn.feature_selection.chi2
- 8.8.9. sklearn.feature_selection.f_classif
- 8.8.10. sklearn.feature_selection.f_regression
- 8.9. sklearn.gaussian_process: Gaussian Processes
- 8.9.1. sklearn.gaussian_process.GaussianProcess
- 8.9.2. sklearn.gaussian_process.correlation_models.absolute_exponential
- 8.9.3. sklearn.gaussian_process.correlation_models.squared_exponential
- 8.9.4. sklearn.gaussian_process.correlation_models.generalized_exponential
- 8.9.5. sklearn.gaussian_process.correlation_models.pure_nugget
- 8.9.6. sklearn.gaussian_process.correlation_models.cubic
- 8.9.7. sklearn.gaussian_process.correlation_models.linear
- 8.9.8. sklearn.gaussian_process.regression_models.constant
- 8.9.9. sklearn.gaussian_process.regression_models.linear
- 8.9.10. sklearn.gaussian_process.regression_models.quadratic
- 8.10. sklearn.grid_search: Grid Search
- 8.11. sklearn.hmm: Hidden Markov Models
- 8.12. sklearn.kernel_approximation Kernel Approximation
- 8.13. sklearn.semi_supervised Semi-Supervised Learning
- 8.14. sklearn.lda: Linear Discriminant Analysis
- 8.15. sklearn.linear_model: Generalized Linear Models
- 8.15.1. For dense data
- 8.15.1.1. sklearn.linear_model.LinearRegression
- 8.15.1.2. sklearn.linear_model.Ridge
- 8.15.1.3. sklearn.linear_model.RidgeClassifier
- 8.15.1.4. sklearn.linear_model.RidgeCV
- 8.15.1.5. sklearn.linear_model.Lasso
- 8.15.1.6. sklearn.linear_model.LassoCV
- 8.15.1.7. sklearn.linear_model.ElasticNet
- 8.15.1.8. sklearn.linear_model.ElasticNetCV
- 8.15.1.9. sklearn.linear_model.Lars
- 8.15.1.10. sklearn.linear_model.LassoLars
- 8.15.1.11. sklearn.linear_model.LarsCV
- 8.15.1.12. sklearn.linear_model.LassoLarsCV
- 8.15.1.13. sklearn.linear_model.LassoLarsIC
- 8.15.2.5. sklearn.linear_model.LogisticRegression
- 8.15.1.15. sklearn.linear_model.OrthogonalMatchingPursuit
- 8.15.1.16. sklearn.linear_model.Perceptron
- 8.15.1.17. sklearn.linear_model.SGDClassifier
- 8.15.1.18. sklearn.linear_model.SGDRegressor
- 8.15.1.19. sklearn.linear_model.BayesianRidge
- 8.15.1.20. sklearn.linear_model.ARDRegression
- 8.15.1.21. sklearn.linear_model.RandomizedLasso
- 8.15.1.22. sklearn.linear_model.RandomizedLogisticRegression
- 8.15.1.23. sklearn.linear_model.lasso_path
- 8.15.1.24. sklearn.linear_model.lars_path
- 8.15.1.25. sklearn.linear_model.orthogonal_mp
- 8.15.1.26. sklearn.linear_model.orthogonal_mp_gram
- 8.15.1.27. sklearn.linear_model.lasso_stability_path
- 8.15.2. For sparse data
- 8.15.1. For dense data
- 8.16. sklearn.manifold: Manifold Learning
- 8.17. sklearn.metrics: Metrics
- 8.17.1. Classification metrics
- 8.17.1.1. sklearn.metrics.confusion_matrix
- 8.17.1.2. sklearn.metrics.roc_curve
- 8.17.1.3. sklearn.metrics.auc
- 8.17.1.4. sklearn.metrics.precision_score
- 8.17.1.5. sklearn.metrics.recall_score
- 8.17.1.6. sklearn.metrics.fbeta_score
- 8.17.1.7. sklearn.metrics.f1_score
- 8.17.1.8. sklearn.metrics.precision_recall_fscore_support
- 8.17.1.9. sklearn.metrics.classification_report
- 8.17.1.10. sklearn.metrics.precision_recall_curve
- 8.17.1.11. sklearn.metrics.zero_one_score
- 8.17.1.12. sklearn.metrics.zero_one
- 8.17.1.13. sklearn.metrics.hinge_loss
- 8.17.2. Regression metrics
- 8.17.3. Clustering metrics
- 8.17.3.1. sklearn.metrics.adjusted_rand_score
- 8.17.3.2. sklearn.metrics.adjusted_mutual_info_score
- 8.17.3.3. sklearn.metrics.homogeneity_completeness_v_measure
- 8.17.3.4. sklearn.metrics.homogeneity_score
- 8.17.3.5. sklearn.metrics.completeness_score
- 8.17.3.6. sklearn.metrics.v_measure_score
- 8.17.3.7. sklearn.metrics.silhouette_score
- 8.17.4. Pairwise metrics
- 8.17.4.1. sklearn.metrics.pairwise.euclidean_distances
- 8.17.4.2. sklearn.metrics.pairwise.manhattan_distances
- 8.17.4.3. sklearn.metrics.pairwise.linear_kernel
- 8.17.4.4. sklearn.metrics.pairwise.polynomial_kernel
- 8.17.4.5. sklearn.metrics.pairwise.rbf_kernel
- 8.17.4.6. sklearn.metrics.pairwise.distance_metrics
- 8.17.4.7. sklearn.metrics.pairwise.pairwise_distances
- 8.17.4.8. sklearn.metrics.pairwise.kernel_metrics
- 8.17.4.9. sklearn.metrics.pairwise.pairwise_kernels
- 8.17.1. Classification metrics
- 8.18. sklearn.mixture: Gaussian Mixture Models
- 8.19. sklearn.multiclass: Multiclass and multilabel classification
- 8.19.1. Multiclass and multilabel classification strategies
- 8.19.2. sklearn.multiclass.OneVsRestClassifier
- 8.19.3. sklearn.multiclass.OneVsOneClassifier
- 8.19.4. sklearn.multiclass.OutputCodeClassifier
- 8.19.5. sklearn.multiclass.fit_ovr
- 8.19.6. sklearn.multiclass.predict_ovr
- 8.19.7. sklearn.multiclass.fit_ovo
- 8.19.8. sklearn.multiclass.predict_ovo
- 8.19.9. sklearn.multiclass.fit_ecoc
- 8.19.10. sklearn.multiclass.predict_ecoc
- 8.20. sklearn.naive_bayes: Naive Bayes
- 8.21. sklearn.neighbors: Nearest Neighbors
- 8.21.1. sklearn.neighbors.NearestNeighbors
- 8.21.2. sklearn.neighbors.KNeighborsClassifier
- 8.21.3. sklearn.neighbors.RadiusNeighborsClassifier
- 8.21.4. sklearn.neighbors.KNeighborsRegressor
- 8.21.5. sklearn.neighbors.RadiusNeighborsRegressor
- 8.21.6. sklearn.neighbors.BallTree
- 8.21.7. sklearn.neighbors.kneighbors_graph
- 8.21.8. sklearn.neighbors.radius_neighbors_graph
- 8.22. sklearn.pls: Partial Least Squares
- 8.23. sklearn.pipeline: Pipeline
- 8.24. sklearn.preprocessing: Preprocessing and Normalization
- 8.24.1. sklearn.preprocessing.Scaler
- 8.24.2. sklearn.preprocessing.Normalizer
- 8.24.3. sklearn.preprocessing.Binarizer
- 8.24.4. sklearn.preprocessing.LabelBinarizer
- 8.24.5. sklearn.preprocessing.KernelCenterer
- 8.24.6. sklearn.preprocessing.scale
- 8.24.7. sklearn.preprocessing.normalize
- 8.24.8. sklearn.preprocessing.binarize
- 8.25. sklearn.qda: Quadratic Discriminant Analysis
- 8.26. sklearn.svm: Support Vector Machines
- 8.27. sklearn.tree: Decision Trees
- 8.28. sklearn.utils: Utilities