I did not understand the whole program.
End-to-End Machine Learning Project Part-2
To make this notebook’s output identical at every run
np.random.seed(42)
np.random.permutation(5)
def split_train_set(data,test_ratio):
shuffled_indices=np.random.permutation(len(data))
test_set_size=int(len(data)*test_ratio)
test_indices=shuffled_indices[:test_set_size]
train_indices=shuffled_indices[test_set_size]
return data.iloc[train_indices],data.iloc[test_indices]
train_set,test_set = split_train_test(housing,0.2)
print(len(train_set),"train+",len(test_set),"test")
Please tell me the steps.
Please reply.