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
cfiutak1 authored Apr 2, 2019
1 parent db17e11 commit 5536b69
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Part 1 - Introduction to Machine Learning with scikit-learn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Finding a Dataset
The first step to developing a good machine learning algorithm is using a good dataset. Many of the most accurate machine learning algorithms have millions if not billions of entries in their training data sets. Fortuntately for us, there are many robust datasets we can use to build our ML algorithms.
The first step to developing a good machine learning algorithm is using a good dataset. Many of the most accurate machine learning algorithms have millions if not billions of entries in their training data sets. Fortuntately for us, there are many small yet robust datasets we can use to build our ML algorithms.

The scikit-learn library comes with some good starting datasets. For today's activity, we'll be using the digits dataset, which contains images of handwritten numerical digits. To use this dataset, we'll import the load_digits function from sklearn.datasets and store it in a variable called digits.
The scikit-learn library comes with some good starting datasets. For today's activity, recognizing handwritten numbers from scikit-learn's `digits` dataset. To use this dataset, we'll import the `load_digits` function from `sklearn.datasets` and store it in a variable called `digits`.
```
from sklearn.datasets import load_digits
digits = load_digits()
Expand Down Expand Up @@ -118,3 +118,12 @@ And now to test these algorithms:
print("Linear Regression accuracy:", str(linear_model.score(X_test, Y_test) * 100) + "%")
print("Logistic Regression accuracy:", str(logistic_model.score(X_test, Y_test) * 100) + "%")
```

```
Linear Regression accuracy: 57.76594509083273%
Logistic Regression accuracy: 94.88320355951056%
```
 

Clearly, logistic regression is a far more suitable algorithm for this

0 comments on commit 5536b69

Please sign in to comment.