From the course: Machine Learning with Scikit-Learn

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Train test split

Train test split - scikit-learn Tutorial

From the course: Machine Learning with Scikit-Learn

Start my 1-month free trial

Train test split

- [Instructor] The goal of machine learning is it build a model that performs well on new data. If you have new data, you can see how well your model performs on it. The problem is that you may not have new data, but you can simulate this experience with Scikit Learn's train test split. In this video, I'll show you how train test split works in Scikit Learn. The first thing that you need to know is what is train test split? Here's how that procedure works. The first step is to split your data into two pieces, a training set and a testing set. Typically, about 75% of the data goes to your training set and about 25% of your data goes to the test set. The second step of the process is to train the model on the training set. The final step is to test the model on the testing set and evaluate the performance. To do this in Scikit Learn, you first have to import libraries. The next step is to load a dataset. The dataset…

Contents