1.6 Data Table Terminology and Data Splitting
[video] /api/lesson-media/videos/9b417aa2-5e9f-4ae3-a9db-2a3b7f03f372-1794614999883-94378619710eed44.mp4
[markdown] content available only on the platform
[markdown] content available only on the platform
Flashcards · 1.6 Data Table Terminology and Data Splitting
Sample — One row of a dataset, representing one individual example; also called record, observation, object or item.
One house in the housing table.
Feature (attribute) — An input column used to make a prediction; also called predictor or input variable.
square_feet, tier, city, has_garden
Target (label) — The column whose value the model tries to predict; also called output or dependent variable.
price
Feature vector — All feature values of one sample packed into a list, excluding the target.
[65, "Mid-range", "Hanoi", "No"]
Train set — The largest part of the data, used by the model to learn.
70% of the rows.
Validation set — A held-out part used to compare models and tune settings during experiments.
Like a practice quiz midway through a course.
Test set — A part kept untouched until the end and used once for an honest final score.
Like a final exam with unseen questions.
train_test_split() — scikit-learn function that randomly splits features and target into two parts.
train_test_split(X, y, test_size=0.3, random_state=42)
Optimistic evaluation — A misleadingly high score obtained by testing a model on data it was trained on.
Near-perfect accuracy on rows the model memorised.
