Skip to content

LightGBM, Tweedie, and GAM trainers converted to tainerEstimators #962

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

Merged
merged 10 commits into from
Sep 21, 2018

Conversation

sfilipi
Copy link
Member

@sfilipi sfilipi commented Sep 20, 2018

No description provided.

Utility methods for the column shape creations.
@sfilipi
Copy link
Member Author

sfilipi commented Sep 20, 2018

Usings should be sorted, but code comments coming on the next iteration. #Resolved

@Zruty0 Zruty0 mentioned this pull request Sep 20, 2018
@sfilipi
Copy link
Member Author

sfilipi commented Sep 20, 2018

Add tests


In reply to: 423047158 [](ancestors = 423047158)

/// <summary>
/// The <see cref="SchemaShape.Column"/> for the feature column.
/// </summary>
/// <param name="weightColumn">name of the feature column</param>
Copy link
Contributor

@zeahmed zeahmed Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name of the feature column [](start = 39, length = 26)

Description does not agree to name of the parameter...:) #Resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I see that some of the methods have comments while others don't.


In reply to: 219253274 [](ancestors = 219253274)

private protected readonly Dictionary<string, object> Options;
private protected readonly IParallel ParallelTraining;
private protected Dictionary<string, object> Options;
private protected IParallel ParallelTraining;
Copy link
Contributor

@zeahmed zeahmed Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to keep them readonly. I see the problem why you made them non-readonly.
May be call the second constructor from the first one and create Args in static method for passing into the second one.
This way you can initialize them in the second constructor only. #WontFix

Copy link
Member Author

@sfilipi sfilipi Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, and looked into, but I can't do it because the two constructor call different base class constructors. Merging the constructors earlier is possible, but i feel liek it would look messy, because the distinction on whether you came from the API, or maml would be based on checking presence/absence of parameters.. think I'll leave it as is.


In reply to: 219271083 [](ancestors = 219271083)

Copy link
Contributor

@zeahmed zeahmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

}

public static SchemaShape.Column MakeU4ScalarLabel(string labelColumn)
{
Copy link
Contributor

@Zruty0 Zruty0 Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ [](start = 7, length = 2)

use => #Resolved

using Microsoft.ML.Runtime.Data;
using Microsoft.ML.Runtime.Internal.Utilities;
using System;
using System.Collections.Generic;
using Float = System.Single;
Copy link
Contributor

@Zruty0 Zruty0 Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Float = System.Single [](start = 5, length = 22)

get rid of this altogether in favor of float #Resolved

@Zruty0
Copy link
Contributor

Zruty0 commented Sep 20, 2018

+1, let's have a TestEstimatorCore test for them, and they look good to go from my perspective.


In reply to: 423051710 [](ancestors = 423051710,423047158)

Copy link
Contributor

@Zruty0 Zruty0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@sfilipi sfilipi merged commit b88d346 into dotnet:master Sep 21, 2018
@sfilipi sfilipi deleted the lightGbmGamEstimators branch September 25, 2018 17:57
@ghost ghost locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants