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 cdb9f26 commit 2d57415
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ print(digits.DESCR)

For thoroughness, we can print the shape of the dataset with
```
print(digits.data.shape) # Should show 1797 rows and 64 columns
print(digits.data.shape) # Should show 1797 rows and 64 columns, where each column is representative of one pixel in an image
```
 

We can also use the matplotlib library to display the images in this dataset. Add the following code to your script to display the first image in the dataset:
```
import matplotlib.pyplot as plt
plt.gray()
plt.matshow(digits.images[0])
plt.matshow(digits.images[0]) # Change the number here to look at different images
plt.show()
```
 
Expand Down

0 comments on commit 2d57415

Please sign in to comment.