Skip to content

Example of multiclass classification with random forest? #503

Closed
@gilnahmias

Description

@gilnahmias

Looking to train multiclass classification with random forest and hyperparameter tuning.

Tried (on dotnetcore with either the latest LightGbm nuget or cloning the repo directly):

var pipeline = new LearningPipeline();

pipeline.Add(new TextLoader(_dataFilePath).CreateFrom<MyDataClass>());

 // for features
pipeline.Add(new TextFeaturizer("My_Feature1_Vectorized","My_Feature1"));
pipeline.Add(new TextFeaturizer("My_Feature2_Vectorized","My_Feature2"));

// for the label
pipeline.Add(new TextFeaturizer("Label_Vectorized", "Label"));

// ** CAN'T FIND FAST FOREST MULTI CLASS CLASSIFIER ** //
pipeline.Add(new LightGbmClassifier() { NumLeaves = 5, NumTrees = 5, MinDocumentsInLeafs = 2 });

var model = pipeline.Train<MyDataClass, MyPredictionClass>();

This code crashes with System.InvalidOperationException: Entry point 'Trainers.LightGbmClassifier' not found

Also, if I'm missing any crucial steps (say around conversion from numbers to text or vice versa), please point them out.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions