
Machine Learning Data Preparation: From Raw Rows to Model Inputs
Your model is only as smart as the table you hand it. Most beginners skip straight to fitting an algorithm, then blame the model when results disappoint.…
Read tutorialTurn raw tables into trustworthy inputs with sensible features, scaling, encoding, missing-data strategies, leakage prevention, and repeatable pipelines.
Tutorials
Follow the learning path in order or jump directly to the concept or workflow you need.

Your model is only as smart as the table you hand it. Most beginners skip straight to fitting an algorithm, then blame the model when results disappoint.…
Read tutorial
Every supervised learning problem is a question about a table. The hard part is knowing which columns the model is allowed to look at.
Read tutorial
The real question is not whether a column contains text or numbers. It is whether the model should treat those values as ordered quantities or as separate…
Read tutorial
You train the same model twice on the same data. The only difference: you scaled the features before the second run. The results are not slightly…
Read tutorial
You train a model. The validation score comes back at 0.98. You feel like a genius. Then the model goes into the real world and performs like a coin flip.
Read tutorial
You fit a scaler on your full dataset, split into training and test sets, train a model, and watch it score beautifully. Then the model meets real data and…
Read tutorial
Every beginner hits the same wall: you load a real dataset, and it is full of holes. Columns you need are dotted with NaN. Your model refuses to run. So…
Read tutorial
Your data is clean. Your rows are ready. Then you feed the model a column of colors—"red", "green", "blue"—and it refuses to train. The error message is…
Read tutorial
One dataset, many feature types, one honest workflow. That is the problem ColumnTransformer solves.
Read tutorial
Every beginner hits the same fork in the road. You plot your data, spot a few points sitting far from the pack, and freeze. Delete them? Keep them? The…
Read tutorial
You scale the whole table, split it, train a model, and get 0.94. You ship it, and real data hands you 0.71. Nothing broke in production. The break…
Read tutorial
You have three pipelines. Their scores are close enough that the ranking feels like a coin flip. So you run them against the test set to break the tie —…
Read tutorial
Fill the missing values, split the data, train the model, and watch your score climb. It feels like progress. It is usually a leak.
Read tutorial
Swap OrdinalEncoder for OneHotEncoder, rerun the script, and the score moves. That single number feels like a verdict: one encoder is better. It isn't. You…
Read tutorial
Here is the uncomfortable truth about missing data: in a real dataset, you never see the values that went missing. You cannot check whether your imputation…
Read tutorial
Two analysts open the same CSV. Both see the same 12% of rows with a blank in the income column. One drops those rows and reports a mean of 54,000. The…
Read tutorial
Two houses sit side by side in your table. One is 1,800 square feet with 3 bedrooms. The other is 2,000 square feet with 5 bedrooms. To a k-NN model, the…
Read tutorial