You are on page 1of 1

1 Problem Predicting Height

X-Age| Y-Height

2 Dataset Predicting Height based on Age

(71, 2)

dataset.shape
3 Summarize Dataset
dataset.head(5)

Input

X = dataset.iloc[:, :-1].values

4 Segregate Dataset into X & Y Output


Height Prediction using
Y = dataset.iloc[:, -1].values
DECISION TREE

Splitting dataset to train & test


5 for Validation train_test_split

6 Algorithm Decision Tree

7 Train using Decision Tree

Observe how the line fits for our


8 Visualizing Graph data points

r2_score
9 Prediction & Validation
mean_squared_error

You might also like