O'Reilly logo

C# Machine Learning Projects by Yoon Hyup Hwang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image features - pixels

Let's now look at image features. In our dataset, we have integer values for each pixel in each image that represent a grayscale value. It will be helpful to understand the ranges of values each pixel can take, and whether we can find any noticeable differences in the distributions of that pixel data among different handwritten digit classes.

We will first take a look at individual distributions of pixel data. The following code snippet shows how you can calculate the quartiles for each pixel in our dataset:

List<string> featureCols = new List<string>();foreach (string col in featuresDF.ColumnKeys){    if (featureCols.Count >= 20)    {        break;    }    if (col.StartsWith("pixel"))    {        if (featuresDF[col].Max() > 0)        { featureCols.Add(col); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required