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

Variable distributions

Let's start looking at the distributions in our dataset. First, we will take a look at the top five countries by the volume of transactions. The code we used to aggregate the records by the countries and count the number of transactions that occurred in each country is as follows:

// 2. Number of transactions by countryvar numTransactionsByCountry = ecommerceDF    .AggregateRowsBy<string, int>(        new string[] { "Country" },        new string[] { "CustomerID" },        x => x.ValueCount    ).SortRows("CustomerID");var top5 = numTransactionsByCountry    .GetRowsAt(new int[] {        numTransactionsByCountry.RowCount-1, numTransactionsByCountry.RowCount-2,        numTransactionsByCountry.RowCount-3, numTransactionsByCountry.RowCount-4, numTransactionsByCountry.RowCount-5 ...

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