- Courses
- Machine Learning
- Learning Problems, Data, and a First Model
Unit 1 of 15
Learning Problems, Data, and a First Model
- 10 lessons
- Videos 1 to 10
Machine learning starts from a prediction question and a table whose rows and columns have clear meanings. This unit frames learning tasks, splits and prepares data honestly and fits a first model.
A learning task names the target, the features known at prediction time and the decision the prediction supports, and Python arrays and tables hold the data. Training, validation and test sets give the data separate jobs, and a split that matches the intended use prevents leakage through future information, repeated customers or fitted preprocessing. Exploratory analysis checks units, duplicates and outliers, and missing values, scaling and categories are handled with rules learned from training data only. The unit ends with k-nearest neighbors and with overfitting and underfitting.
Every lesson is one video. Each lesson page has the definitions and an example for every key term.
Learning Tasks and Data Tables
What Is Machine Learning?
How a practical question becomes a learning task, how supervised, unsupervised and reinforcement learning differ, what separates regression from classification, and why a model needs a baseline and is not a causal explanation.
Features, Targets, and Prediction Time
How to say what one row of a learning table represents, which fields are features available at prediction time, how a target rule gives labels, what the prediction horizon is, and how target leakage arises.
Video 2
Python Arrays and Tables for Machine Learning
How pandas DataFrames and NumPy arrays hold features and targets, what shape, indexing, slicing and axes mean, how elementwise multiplication and broadcasting differ from the matrix product, and why notebooks need clean reruns.
Video 3
Splitting Data Honestly
Training, Validation, and Test Sets
How training, validation and test sets split fitting, model choice and final evaluation, how parameters differ from hyperparameters, and how a constant baseline and the deployment population shape claims of generalization.
Video 4
Data Leakage and Honest Splitting
How data leakage lets unavailable information into training or evaluation, how to find the information boundary, and when to use random row, group or temporal splits, with duplicate and preprocessing leakage.
Video 5
Data Quality and Feature Preparation
Exploratory Data Analysis and Data Quality
How exploratory data analysis checks data quality before modeling, and how the empirical distribution, histograms, the mean, the median and quantiles describe a variable, with outliers flagged for investigation, not deletion.
Video 6
Missing Data and Reliable Imputation
How missing values, missingness indicators and the mechanisms MCAR, MAR and MNAR shape a data treatment, how to fit imputation on training data only, and why complete cases and missing targets need care.
Video 7
Feature Scaling and Categorical Encoding
How feature scaling, standardization with the mean and standard deviation, and min-max scaling are fitted on training data only, and how one-hot encoding handles ordinal and unknown categories.
Video 8
A First Model and Overfitting
K-Nearest Neighbors
How k-nearest neighbors predicts from Euclidean distance with a majority vote or, in k-nearest neighbor regression, an average, and how the number of neighbors, feature scaling and a tie-breaking rule are set.
Video 9
Overfitting, Underfitting, and Model Complexity
How training error and validation error reveal overfitting and underfitting, how the number of neighbors sets model complexity, and why a memorizing predictor's zero training error proves little.
Video 10