Skip to content

MLContext to create them all #1098

@Zruty0

Description

@Zruty0

During one of the in-person API reviews we agreed that it would be a good idea to have a single object MLContext that would serve as a 'factory of everything' (similar to the HTTP context / DB context in the .NET world).

  • MLContext will explicitly implement IHostEnvironment, so you can create all the existing estimators by giving the context as the first argument.
  • MLContext will have properties BinaryClassification, Regression, Clustering etc. for canonical ML tasks (the ones that are currently classes in themselves), complete with Evaluate and all corresponding trainers.
  • It will have extension methods for non-canonical tasks like recommendation or anomaly detection etc.
  • It will have properties Transformation, Filtering, Loading to instantiate all known transform estimators, filters and data readers (again via extension methods).
  • It will have a pair of methods SaveModel and LoadModel that handle model serialization.

/cc @KrzysztofCwalina @TomFinley @eerhardt @markusweimer @asthana86

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly APIenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions