Chapter 34
3.3 Setting up the validation framework
3.3 Setting up the validation framework
![]()
Notes
Splitting the dataset with Scikit-Learn.
Classes, functions, and methods:
train_test_split- Scikit-Learn class for splitting a dataset into two parts. Thetest_sizeargument states how large the test set should be. Therandom_stateargument sets a random seed for reproducibility purposes.df.reset_index(drop=True)- reset the indices of a dataframe and delete the previous ones.df.x.values- extract the values from x seriesdel df['x']- delete x series from a dataframe
The entire code of this project is available in this jupyter notebook.
