-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Training regression model from DataView #1235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The API is still changing a bit with PR #1252 but see if those would help get started: https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Trainers.cs#L19 |
I guess I am still stuck. In my scenario I am not reading from a data file (it is coming in from a REST API source) and therefore I don't have the reader from TextLoader.CreateReader(....) to create the learningPipeline from, using reader.MakeNewEstimator(...). |
see if the dynamic style of the API helps: Also, might be easier if you post a snippet of your code? which estimator do you want to use first? you can just instantiate it |
Yeah. That helped. I think I can get it going. I had looked at before but re-looking at it today helped today. For some reason I was thinking I had to have a certain start to the EstimatorChain. I am going to spend time on it tomorrow so I will update my response more concretely then. |
I think I am at an odd spot waiting for the .7 version of the nuget (or building the sourcelocally). The examples now use the MLContext which isn't in .6 (at least in .NET core that I added from NuGet today), but it looks like once I have that, I should be on the right path with what I have below. This is the code I have, the things commented out are because currently they don't produce a happy compiler, but are what I am expecting. Basically I am taking the taxi example and instead of getting the data from the file, I uploaded the file to a database and want to get it from there.
|
If you want to play around with the current version of the code (before .7), you can build the packages locally. Just follow this doc to build locally: https://github.com/dotnet/machinelearning/blob/master/docs/project-docs/developer-guide.md And then to produce the packages locally you can run the command: |
If you don't have any other questions on this topic, I will close the issue in a few days. |
Compiling .7 locally works. Thanks |
It works to get the context but I am still not getting a good result from the linear regression. Using Basically I am getting a 0 for my prediction when I do the below code. I get an error if I don't include the Data ColumnName on a property of ocsObj. (Data was added to ocsObj even though there is no values there at all). The error I get if I don't include the Data ColumnName on the PredictionFunction TSrc type is: System.InvalidOperationException: 'Column 'Data' not found in the data view'.
|
How do I train a regression models if I bring in the data via a DataView from a custom end point via the IEnumerable<>? I tried following the cookbook example but I couldn't find the right trainer to do this.
The text was updated successfully, but these errors were encountered: