instead of
# Holdout split
split = 0.7
d_train = d[:int(split*len(d))]
d_test = d[int((1-split)*len(d)):]
shoud be the fiollowing code
# Holdout split
split = 0.7
d = list(range(1, 10))
d_train = d[:int(split*len(d))]
d_test = d[int((split)*len(d)):]
it breaks all the models in this part of book, the modes are overfitted
Here is the simple example
# Holdout split
split = 0.7
d = list(range(1, 10))
d_train = d[:int(split*len(d))]
d_test = d[int((1-split)*len(d)):]
print(d_train)
print(d_test)
[1, 2, 3, 4, 5, 6]
[3, 4, 5, 6, 7, 8, 9]
instead of
shoud be the fiollowing code
it breaks all the models in this part of book, the modes are overfitted
Here is the simple example