Model Pipeline - Training data preparation
This pipeline shows how raw data is cleaned and organized before training a machine learning model. It prepares the data so the model can learn well.
Jump into concepts and practice - no test required
This pipeline shows how raw data is cleaned and organized before training a machine learning model. It prepares the data so the model can learn well.
Loss
0.7 |****
0.6 |****
0.5 |***
0.4 |**
0.3 |*
+------------
1 2 3 4 5 Epochs
| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.65 | 0.60 | Model starts learning with moderate loss and accuracy |
| 2 | 0.50 | 0.72 | Loss decreases and accuracy improves as model learns |
| 3 | 0.40 | 0.80 | Model continues to improve with lower loss and higher accuracy |
| 4 | 0.35 | 0.85 | Training converges with good accuracy and low loss |
| 5 | 0.32 | 0.87 | Final epoch shows stable loss and accuracy |
train_test_split with parameters like test_size.print(X_train.shape, X_test.shape)?
from sklearn.model_selection import train_test_split import numpy as np X = np.arange(20).reshape(10, 2) X_train, X_test = train_test_split(X, test_size=0.3, random_state=42)
from sklearn.preprocessing import MinMaxScaler scaler = MinMaxScaler() X = [[-1, 2], [-0.5, 6], [0, 10], [1, 18]] X_scaled = scaler.fit_transform(X) print(X_scaled)