โหมดทดลอง — การชำระเงินเป็นการจำลอง และอีเมลทั้งหมดจะไปที่ กล่องอีเมลทดลอง · ระบบจำลองการชำระเงิน
DDSP
ภาพปก Machine Learning with Python — page spread 1 Machine Learning with Python — page spread 2 Machine Learning with Python — page spread 3 Machine Learning with Python — page spread 4 Machine Learning with Python — page spread 5 Machine Learning with Python — page spread 6 Machine Learning with Python — page spread 7 Machine Learning with Python — sample page Machine Learning with Python — sample page Machine Learning with Python — sample page

Learn machine learning with Python and scikit-learn from zero: what ML is and isn't, NumPy and pandas essentials, the workflow with train/test splits and baselines, linear and logistic regression, k-nearest neighbors, SVMs, decision trees, random forests, gradient boosting, preprocessing and…

A Hands-On scikit-learn Guide for Beginners

Read before you buy: the PDF here is a free sample — the first 20 pages of the 486-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.

Learn machine learning by building it: from your first model to a tested, explained, deployed, and monitored prediction system.

Machine learning is less mysterious than it looks. Most useful ML comes down to asking a clear question, preparing data carefully, fitting a well-understood model, and checking honestly whether it works. If you can write a little Python, you can learn to do that well — and this book shows you how, one runnable example at a time.

We use scikit-learn, pandas, and NumPy, and we explain every idea in plain words before the code. No prior statistics, linear algebra, or calculus is required. Just as important as the algorithms, you learn the habits that separate models that work from models that only look good: baselines, proper splits, pipelines, cross-validation, the right metrics, leakage checks, explanations, fairness checks, and monitoring after deployment.

What's inside

  • What machine learning is and is not, supervised vs unsupervised learning, and when a simple rule is the better answer
  • A clean Python setup with virtual environments and your first model in a few lines
  • NumPy and pandas essentials: arrays, broadcasting, loading, exploring, grouping, and cleaning real-looking data
  • The ML workflow: framing a problem, train/test splits, stratification, and honest baselines
  • Core algorithms explained simply: linear and logistic regression, k-nearest neighbors, support vector machines, decision trees, and random forests
  • Gradient boosting with HistGradientBoosting, including native handling of missing values
  • Preprocessing done right: imputation, scaling, one-hot encoding, and why everything belongs in a Pipeline with ColumnTransformer
  • Cross-validation and the metrics that matter: accuracy, precision, recall, F1, ROC AUC, MAE, RMSE, and R²
  • Imbalanced classes, decision thresholds chosen from business constraints, and hyperparameter tuning with grid, random, and successive halving search
  • Feature engineering that actually helps — and data leakage, the most common way models fool their builders
  • Clustering with k-means, dimensionality reduction with PCA, and model interpretation with permutation importance
  • Responsible ML: group metrics, proxies, small-sample pitfalls, and writing a model card
  • Production basics: saving and versioning models with joblib, a small prediction API, batch scoring, and drift monitoring with the Population Stability Index
  • A complete capstone and a map of what to learn next, including deep learning

One running example, start to finish. You work for Streamnest, a fictional video-streaming subscription service. With a dataset of 4,000 subscribers — plans, billing cycles, viewing habits, support tickets, payment failures, survey scores, missing values and all — you predict which subscribers will cancel next month, forecast how many hours each will watch, and discover the different kinds of viewers. A seeded script generates the data, so every number you see in the book is the number you get on your own machine. By the end, the churn model is tuned, explained, checked for fairness, saved with its metadata, served behind an API, and monitored as a newer batch of customers drifts away from the training data.

Current and honest. Every example was run with Python 3.12, scikit-learn 1.9, pandas 3.0, and NumPy 2.5, and every output in the book is real. Recent API changes — such as the deprecated penalty argument of LogisticRegression and pandas Copy-on-Write — are covered so your code works today. The book contains no invented benchmarks or statistics. Every chapter includes runnable code, real output, Tips, Notes, Warnings, exercises, and Key Takeaways, and the appendices give you a cheat sheet, tested templates, a production checklist, and a glossary.

Format: PDF, 486 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. This book is independent and is not affiliated with, sponsored by, or endorsed by the Python Software Foundation, the scikit-learn project, the pandas project, the NumPy project, or NumFOCUS.

Table of Contents

Part I — Foundations

  • Ch 1 · What Machine Learning Is (and Isn't)
  • Ch 2 · Setting Up Python and scikit-learn: Your First Model
  • Ch 3 · NumPy Essentials for Machine Learning
  • Ch 4 · pandas Essentials: Loading, Exploring, and Cleaning Data
  • Ch 5 · The Machine Learning Workflow: Framing, Splitting, and Baselines

Part II — Core Algorithms

  • Ch 6 · Linear Regression: Forecasting Watch Hours
  • Ch 7 · Logistic Regression: Predicting Churn
  • Ch 8 · k-Nearest Neighbors and Support Vector Machines: Distance, Scaling, and Margins
  • Ch 9 · Decision Trees: Learning Rules from Data
  • Ch 10 · Random Forests: The Wisdom of Many Trees

Part III — Reliable Workflows

  • Ch 11 · Preprocessing: Missing Values, Scaling, and Categorical Features
  • Ch 12 · Pipelines and ColumnTransformer: From Raw Data to Prediction in One Object
  • Ch 13 · Cross-Validation: Trustworthy Performance Estimates
  • Ch 14 · Classification Metrics: Accuracy, Precision, Recall, F1, and ROC AUC
  • Ch 15 · Regression Metrics and Residual Analysis

Part IV — Better Models

  • Ch 16 · Gradient Boosting with HistGradientBoosting
  • Ch 17 · Imbalanced Classes and Decision Thresholds
  • Ch 18 · Hyperparameter Tuning: Grid, Random, and Successive Halving Search
  • Ch 19 · Feature Engineering That Actually Helps
  • Ch 20 · Data Leakage: How Good-Looking Models Lie

Part V — Unsupervised Learning and Trust

  • Ch 21 · Clustering with k-Means: Segmenting Streamnest Viewers
  • Ch 22 · Dimensionality Reduction with PCA
  • Ch 23 · Interpreting Models: Coefficients, Importances, and Permutation Importance
  • Ch 24 · Responsible Machine Learning: Fairness, Bias, and Documentation

Part VI — Production and Capstone

  • Ch 25 · Saving, Loading, and Versioning Models
  • Ch 26 · Serving Predictions: A Small Prediction API
  • Ch 27 · Monitoring Models in Production: Drift and Decay
  • Ch 28 · Capstone: The Streamnest Churn System End to End — and What to Learn Next

Appendices
A · scikit-learn Cheat Sheet
B · Templates and Reference
C · Production Checklist
D · Glossary

Book details

Detail
Pages486
FormatPDF (A4)
LanguageEnglish
LevelBeginner
Edition1st Edition (2026)
Download on this siteFree sample, first 20 pages (PDF)
Publisherthenexbooks

ไฟล์ที่คุณจะได้รับ

PDF
Machine-Learning-with-Python-Free-Sample.pdf
601.5 KB · เวอร์ชัน 1 · อัปเดต 1 Aug 2026

ยังไม่มีรีวิว เฉพาะผู้ซื้อเท่านั้นที่รีวิวได้

สินค้าอื่นจาก thenexbooks

ไปที่ร้าน
$9.00