Skip to content

TrainTestSplit should be inside MLContext.Data  #2337

Closed
@artidoro

Description

@artidoro

Currently TrainTestSplit can be found in the various training tasks in MLContext:

// Split the data 90:10 into train and test sets, train and evaluate.
var (trainData, testData) = mlContext.MulticlassClassification.TrainTestSplit(data, testFraction: 0.1);

Since that is a data operation that only involves splitting data and since it is independent on the training task, it would make more sense to have it in mlContext.Data. The previous line would look like:

var (trainData, testData) = mlContext.Data.TrainTestSplit(data, testFraction: 0.1);

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly APIusabilitySmoothing user interaction or experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions