Scikit-learn
scikit-learn is an open-source Python machine-learning library providing algorithms and tools for data preprocessing, model fitting, selection, and evaluation.
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
Scikit-learn is an open-source Python library providing classical machine learning algorithms, preprocessing utilities, model evaluation tools, and workflow components.
- How it is used
- Supports repeatable tabular-data workflows that preprocess, train, cross-validate, and refit machine-learning models.
- How deep it goes
- Explains the common estimator API and workflow, while deferring lengthy mathematics and model-specific theory.
- Examples
- Demonstrates synthetic binary classification with StandardScaler and LogisticRegression, plus Airbnb listing-value classification with gradient boosting.
- What you can do after
- Apply it via scikit-learn to assemble pipelines, evaluate models with cross-validation, and refit suitable tabular-data models.
Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains scikit-learn →
Effective Data Analysis
scikit-learn is a Python library providing algorithms and utilities for data preparation, predictive modeling, and machine learning.
- How it is used
- Supports predictive workflows that prepare data, fit algorithms, generate forecasts, and evaluate performance on unseen observations.
- How deep it goes
- Demonstrates model fitting and evaluation with linear regression, but stops short of comprehensive explanatory summaries for individual predictors.
- Examples
- Uses rat sightings and weather predictors to demonstrate linear regression, held-out predictions, R-squared, and RMSE.
- What you can do after
- Apply it via Python to split datasets, train predictive models, generate test predictions, and compare regression metrics.
Grokking Machine Learning, Second Edition
An open-source Python machine-learning library providing implementations of common algorithms and data-processing utilities.
- How it is used
- Deploys ready-made estimators for regression and classification after arranging features and labels.
- How deep it goes
- Demonstrates preprocessing, fitting, prediction, parameter inspection, and tree criteria, but leaves algorithm implementation to the library.
- Examples
- Uses Hyderabad housing prices, a small perceptron dataset, and a two-feature triangle-and-square decision-tree dataset.
- What you can do after
- Apply it via estimator classes and fit/predict methods to train models, classify points, predict prices, and inspect learned parameters.
Read how Grokking Machine Learning, Second Edition explains scikit-learn →
Outlier Detection in Python
scikit-learn is an open-source Python machine-learning library providing estimators, preprocessing utilities, model-selection tools, and related functionality.
- How it is used
- Supports tabular outlier-detection projects with estimators, data preparation, evaluation, and standardized prediction outputs.
- How deep it goes
- Explains four detectors, their API outputs, preprocessing requirements, and comparative use, but does not detail their internal algorithms.
- Examples
- Uses Isolation Forest, Local Outlier Factor, one-class Support Vector Machine, Elliptic Envelope, make_classification(), and make_blobs().
- What you can do after
- Apply it via scikit-learn to prepare tabular data, run multiple outlier detectors, and inspect scores and inlier or outlier labels.
Read how Outlier Detection in Python explains scikit-learn →
Grokking Machine Learning
An open-source Python library providing classical machine-learning algorithms and utilities.
- How it is used
- Supports practical workflows for training, testing, evaluating, and tuning classical machine-learning models.
- How deep it goes
- Demonstrates model fitting, graphical boundaries, accuracy, and selected hyperparameters without detailing library internals.
- Examples
- Uses a two-feature triangle-and-square dataset, a linear SVM dataset, and Pandas DataFrames containing numerical features and labels.
- What you can do after
- Apply it via Python to fit classifiers, inspect boundaries, adjust hyperparameters, and evaluate model performance.
Grokking Statistics
scikit-learn is a Python library providing machine-learning algorithms and utilities for data analysis and modeling.
- How it is used
- Fits logistic regression models for binary classification and probability prediction in Python.
- How deep it goes
- Explains fitting, input shaping, penalties, and parameter access, but defers the mathematics of maximum likelihood estimation.
- Examples
- Uses toddler meltdown data, hours without a nap, NumPy arrays, fitted coefficients, a plotted curve, and a 4.78-hour prediction.
- What you can do after
- Apply logistic regression via scikit-learn, inspect fitted parameters, plot the model, and generate outcome probabilities.
Also covered in
- Statistics Every Programmer Needs
- Build AI Drug Discovery PipelinesIn early access (MEAP)
- Financial AI in Practice
- Data-Driven Cybersecurity
- The Well-Grounded Data Analyst
- Data Without Labels
What to know first
- PythonPython is a high-level, general-purpose, dynamically typed programming language with readable syntax and support for multiple programming paradigms.
- visualizationVisualization is the representation of data, information, or concepts in visual form to support inspection, interpretation, analysis, or communication.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
- preprocessingPreprocessing is the preparation or transformation of data or other inputs into a form suitable for subsequent processing, analysis, or execution.
Related concepts
- train_test_splitused by · train_test_split is a scikit-learn function that partitions aligned arrays or datasets into training and test subsets, typically at random.
- Pythonuses · Python is a high-level, general-purpose, dynamically typed programming language with readable syntax and support for multiple programming paradigms.
- machine learningimplements · Machine learning is a field of computational methods in which systems learn patterns or relationships from data to make predictions, decisions, or other outputs.
- random forestused by · A random forest is an ensemble learning model that aggregates predictions from multiple decision trees trained with randomized data samples, feature subsets, or both.
- decision treeuses · A decision tree is a tree-structured model or representation in which successive tests or choices lead through branches to outcomes, predictions, or actions.
Questions about scikit-learn
What is scikit-learn?
scikit-learn is an open-source Python machine-learning library providing algorithms and tools for data preprocessing, model fitting, selection, and evaluation.
Which Manning books explain scikit-learn?
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI, Effective Data Analysis, Grokking Machine Learning, Second Edition, Outlier Detection in Python, Grokking Machine Learning and Grokking Statistics.
What should I know before learning scikit-learn?
Manning books that teach scikit-learn usually introduce Python, visualization, accuracy and preprocessing first.
What is scikit-learn also called?
Scikit-learn is also called sklearn.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.





