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 - scikit-learn Tutorial
From the course: Machine Learning with Scikit-Learn
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
What is supervised learning?54s
-
How to format data for scikit-learn1m 55s
-
Linear regression using scikit-learn4m 32s
-
Train test split1m 53s
-
Logistic regression using scikit-learn3m 55s
-
Logistic regression for multiclass classification3m 36s
-
Decision trees using scikit-learn3m 9s
-
How to visualize decision trees using Matplotlib2m 5s
-
Bagged trees using scikit-learn2m
-
Random forests using scikit-learn2m 41s
-
Which machine learning model should you use?1m 23s
-
-
-