C# Machine Learning Projects: Nine real-world projects to build robust and high-performing machine learning models with C# by Yoon Hyup Hwang

C# Machine Learning Projects: Nine real-world projects to build robust and high-performing machine learning models with C# by Yoon Hyup Hwang

Author:Yoon Hyup Hwang [Hwang, Yoon Hyup]
Language: eng
Format: epub, pdf
Publisher: Packt Publishing
Published: 2018-06-17T23:00:00+00:00


var top5 = numTransactionsByCountry

.GetRowsAt(new int[] {

numTransactionsByCountry.RowCount-1, numTransactionsByCountry.RowCount-2,

numTransactionsByCountry.RowCount-3, numTransactionsByCountry.RowCount-4,

numTransactionsByCountry.RowCount-5 });

top5.Print();

var topTransactionByCountryBarChart = DataBarBox.Show(

top5.GetColumn<string>("Country").Values.ToArray().Select(x => x.Equals("United Kingdom") ? "UK" : x),

top5["CustomerID"].Values.ToArray()

);

topTransactionByCountryBarChart.SetTitle(

"Top 5 Countries with the most number of transactions"

);

As you can see from this code snippet, we are using the AggregateRowsBy method in the Deedle data frame to group the records by country and count the total number of transactions for each country. Then, we sort the resulting data frame using the SortRows method and take the top five countries. When you run this code, you will see the following bar chart:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.