# Feature of data

I have a small doubt. when we talk about digit classification, we basically deal with images so what are the features in this scenario like? I am not quite able to understand the data when it comes to classifying images.

An image is made up of pixels. Each pixel is represented by a value ranged from 0 to 255, where 0 is black, and 255 is white. For colour images, the RGB, the primary colour of red, green, and blue is used. So the features we are concerning with are these pixel values. Because it is these pixels that form the image.

Think of the image (Black and White ones) are just a grid of numbers each of those numbers is called pixel this pixel as we said can be represented by a number which is from (0 to 255) as the number increased the intensity of the pixel increased so 0 for black and 255 for white and what it in between gives us different shades of gray.

now if you can take this grid of numbers and restructure it in a way that is linear where we grind each row from that grid and stack them together in a single row this process is called Flatten.

now you have a single row of numbers representing a single image letâ€™s say 9. bu the data contains so many training examples. after doing Flatten process at all examples you will end up with just rows of data each row contains a single image that is just flattened.

x = \begin{matrix} 212 & 234 & 100 & \\ 212 & 12 & 15 & \\ 22 & 34 & 200 & \\ \end{matrix}

this of x is an example of an image after flatting it becomes
x = [212, 234, 100, 212, 12, 15, 22, 34, 200]

Now, the data is in a proper format to apply Machine Learning to it. you can now apply classification using whatever method you want.