Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view data inside IDataView

Tags:

ml.net

In ML.net, I want to view the data in the IDataView to verify whether the right data is loaded. I cannot see any visualizer/debugging tool to view them just like we view in System.Data.DataTable as a table

var mlContext = new MLContext();
IDataView trainData = mlContext.Data.LoadFromTextFile<TaxiTrip>(GetAbsolutePath("../../taxi-fare-test.csv"), hasHeader: true);
like image 587
Beingnin Avatar asked Sep 05 '25 02:09

Beingnin


1 Answers

There's a Preview method for the IDataView. You can run that method in a variable and debug through there to look at the data.

var preview = trainData.Preview();
like image 88
Jon Avatar answered Sep 06 '25 15:09

Jon