Home > front end >  Stored procedure as a data source in ML.net?
Stored procedure as a data source in ML.net?

Time:03-11

is there a way I can pass stored procedure data in DatabaseSource.

Any other way I can load data from stored procedures in ML.net?

var loader = context.Data.
CreateDatabaseLoader<Patient>();

var SPData=(mySPData);

DatabaseSource dbSource =SPData;

IDataView data= loader.Load(dbSource);

CodePudding user response:

You should be able to as long as you can express it in your query.

https://docs.microsoft.com/dotnet/machine-learning/how-to-guides/load-data-ml-net

One other way to do it would be to execute a query with your stored procedure and map the results to an IEnumerable<T>. Then, load the IEnumerable into an IDataView.

https://docs.microsoft.com/dotnet/machine-learning/how-to-guides/load-data-ml-net#load-data-from-other-sources

  • Related