Save ML.NET IDataView to a database table without POCO

Viewed 45

I have a transformed IDataView with prediction (Score) column, input columns and one-hot encoded columns. I want to save only prediction and input values to a database table.

Usually, one could convert IDataView to IEnumerable and write that to a table:

IEnumerable<SomeType> predictionsEnumerable =
    mlContext.Data.CreateEnumerable<SomeType>(predictions, reuseRowObject: true);

The problem is that I don't have a SomeType defined, and dynamic is not supported in this case, because the method reads public properties from a POCO.

Is it possible to somehow insert these values to a table just by using DataViewSchema?

0 Answers
Related