Skip to content

Creating both environment and context is annoying #1045

@Zruty0

Description

@Zruty0

This is what I have to write in the docs all the time:

// Create a new environment for ML.NET operations. It can be used for exception tracking and logging, 
// as well as the source of randomness.
var env = new LocalEnvironment();

// We know that this is a classification task, so we create a multiclass classification context: it will give us the algorithms
// we need, as well as the evaluation procedure.
var classification = new MulticlassClassificationContext(env);

Can we make context create the environment if they aren't provided one? And also expose it as a property?

/cc @TomFinley

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions