From 0966b3194080cbe50384c247565dae41095bc133 Mon Sep 17 00:00:00 2001 From: AJ Stensland Date: Tue, 2 Apr 2019 05:53:10 +0000 Subject: [PATCH] Update Part 1 - Introduction to Machine Learning with scikit-learn.md --- ...roduction to Machine Learning with scikit-learn.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Part 1 - Introduction to Machine Learning with scikit-learn.md b/Part 1 - Introduction to Machine Learning with scikit-learn.md index 2bf0a98..ac14fd3 100644 --- a/Part 1 - Introduction to Machine Learning with scikit-learn.md +++ b/Part 1 - Introduction to Machine Learning with scikit-learn.md @@ -67,9 +67,14 @@ Thankfully, scikit-learn gives us a method for automatically splitting up our fu ``` from sklearn.model_selection import train_test_split -X_train, X_test, y_train, y_test = train_test_split(digits.data, digits.target, test_size=0.50, random_state=42) -# Note: random_state=42 seeds the random value with 42, meaning that everyone that runs this code will have the same accuracy. -# Machine learning algorithms have a degree of randomness to them, which can be mitigated by using the same random seed. +X_train, X_test, y_train, y_test = train_test_split(digits.data, + digits.target, + test_size=0.50, + random_state=42) +# Note: random_state=42 seeds the random value with 42, meaning that +# everyone that runs this code will have the same accuracy. +# Machine learning algorithms have a degree of randomness to them, +# which can be mitigated by using the same random seed. # Disregard this if you don't know what that means. ```