New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Options.TreeBooster.Arguments #2490

Closed
RobinSmits opened this Issue Feb 10, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@RobinSmits
Copy link

RobinSmits commented Feb 10, 2019

I currently have an ML.Net project based on version 0.10.0. As a starter into ML.Net I'am trying to remake one of my python ML projects into ML.Net.

I'am running on Windows 10 with .NET Core 3.0.100-preview-010184.

I have a pipeline setup (and working) in the following way:

var pipeline = mlContext.Transforms.Concatenate("Features", "Feat1", "Feat2", "Feat3") .Append(mlContext.BinaryClassification.Trainers.LightGbm(numLeaves: 200, numBoostRound: 1000, minDataPerLeaf: 200, learningRate: 0.05, labelColumn: "Label"));

I would like to further specify the LightGBM parameters as are available in Options.TreeBooster.Arguments (specifically FeatureFraction and MaxDepth) but I can't figure out how it should be added or appended to the pipeline. Also I have not been able to find any samples or documentation.

Is it possible to give me some information or clarification about this?

@Ivanidzo4ka

This comment has been minimized.

Copy link
Member

Ivanidzo4ka commented Feb 10, 2019

 var trainer = ML.BinaryClassification.Trainers.LightGbm(new Options
            {
                NumLeaves = 10,
                NThread = 1,
                MinDataPerLeaf = 2,
                Booster = new  Options.DartBooster.Arguments(){ DropRate=1, MaxDepth=3, SkipDrop=3}
            });

We are working on our documentation to provide samples. I expect LightGBM to be covered in 0.11 release.

It doesn't exactly replicate your code, but it's just a sample of how you can do it. All parameters you can specify in simple constructor in LightGBM can be found in Options class.

@RobinSmits

This comment has been minimized.

Copy link
Author

RobinSmits commented Feb 11, 2019

Thanks for your response. I've been able to modify my code based on your response. Still running some tests but it works very nice 👍

I'am looking forward to the 0.11 release and the documentation.

@RobinSmits RobinSmits closed this Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment