Skip to content

Commit

Permalink
Update Part 1 - Introduction to Machine Learning with scikit-learn.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ajstensland authored Apr 2, 2019
1 parent 46ae3c6 commit 0966b31
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Part 1 - Introduction to Machine Learning with scikit-learn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

Expand Down

0 comments on commit 0966b31

Please sign in to comment.