Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The trainer API for MLContext is inconsistent for learner in external nugets #1827
APIs are discoverable via the MLContext. There are some learners that are declared on the MLContext where other learners define an MLContext extension in cases where the learner is in a separate nuget package.
This results inconsistent API calls when accessing APIs, for example BinaryClassification vs Recommendation():
The API discover ability should be consistent and work across nuget pakages.
This issue may be the solution #1319 as it creates extensions for the trainers.
referenced this issue
Dec 5, 2018
This inconsistency was expected by design from the first day: we planned to have properties for 'standard' tasks (available in
If you have any suggestion on how to make them consistent, please make it. The only way I see that we can reconcile the calls is to make all existing properties into methods:
var foo1 = mlContext.BinaryClassification().Trainers().LogisticRegression(); var foo2 = mlContext.Transforms().Categorical().OneHotEncoding();
I do not like this solution: a natural way to represent catalogs is by making them properties. I think sacrificing this natural design in order to make the calls to common and less-common parts of the API more similar is not a good idea.