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

Continuous variable distribution

So far, we have looked at the distributions of categorical variables. Let's now look at the distributions of continuous variables in our feature set. Similar to the previous chapters, we are going to look at the quartiles for each continuous variable. The code to compute quartiles for each continuous feature looks as follows:

foreach (string variable in continuousVars){    Console.WriteLine(String.Format("\n\n-- {0} Distribution (Attack) -- ", variable));    double[] attachQuartiles = Accord.Statistics.Measures.Quantiles(        attackSubset[variable].DropMissing().ValuesAll.ToArray(),        new double[] { 0, 0.25, 0.5, 0.75, 1.0 }    );    Console.WriteLine( "Min: \t\t\t{0:0.00}\nQ1 (25% Percentile): \t{1:0.00}\nQ2 (Median): \t\t{2:0.00}\nQ3 ...

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