Forums

dataset in python

I am using scikit learn to understand machine learning. An introduction to machine learning with scikit-learn

Here the data is loaded into variable digits. digits.data gives us access to the data which is an 8 * 8 matrix. My question is what does the values in digits.data refers to, and why is the maximum value restricted to 16.

My best guess is its the gray scale value of each pixel, if so what is the difference between digits.data and digits.image

Thanks

An introduction to machine learning with scikit-learn

to clarify, digits.image[0] gives you a 8x8 matrix, which is the gray scale value of each pixel in the image. the max value on this gray scale is 16.

digits.data[0] just gives you n feature. In this case perhaps you would have 64 features.