Skip to content

Updated handling of missing values with LightGBM, and added ability to use (0) as missing value #4695

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 24 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5e0b4b6
Update LightGbmTrainerBase.cs
mstfbl Jan 23, 2020
2680b19
Update LightGbmTrainerBase.cs
mstfbl Jan 23, 2020
d857b85
Added UseZeroAsMissingValue as a modifiable LightGBM flag
mstfbl Jan 24, 2020
0faa474
Update core_manifest.json
mstfbl Jan 29, 2020
d3274ea
Merge remote-tracking branch 'upstream/master' into Issue-4681
mstfbl Feb 3, 2020
c72ed38
Updated baseline files for LightGBMClassificationTest()
mstfbl Feb 3, 2020
06754f5
Updated baseline files for GossLightGBMTest()
mstfbl Feb 3, 2020
4397725
Updated baseline files for DartLightGBMTest()
mstfbl Feb 3, 2020
3f082e0
Revert "Updated baseline files for DartLightGBMTest()"
mstfbl Feb 5, 2020
046f5b0
Revert "Updated baseline files for GossLightGBMTest()"
mstfbl Feb 5, 2020
9c426e1
Revert "Updated baseline files for LightGBMClassificationTest()"
mstfbl Feb 5, 2020
00aaf35
Update TestPredictors.cs
mstfbl Feb 5, 2020
59bcaca
Revert "Revert "Updated baseline files for LightGBMClassificationTest…
mstfbl Feb 6, 2020
4c0ff8a
Revert "Revert "Updated baseline files for GossLightGBMTest()""
mstfbl Feb 6, 2020
5f5e950
Revert "Revert "Updated baseline files for DartLightGBMTest()""
mstfbl Feb 6, 2020
6f54895
Updated test datasets and LightGbm flag shortnames
mstfbl Feb 6, 2020
0ea84a6
Added test to confirm run-time behavior of LightGBM doesn't change
mstfbl Feb 6, 2020
5f39dc0
Update core_manifest.json
mstfbl Feb 6, 2020
bc69ac6
Added correct baseline for LightGBMPreviousModelBaselineTest()
mstfbl Feb 7, 2020
906c1a5
Added previously trained model at accessible location for all builds
mstfbl Feb 7, 2020
fdf61ba
Update used library for NetFx builds
mstfbl Feb 7, 2020
955ecfc
Merge remote-tracking branch 'upstream/master' into Issue-4681
mstfbl Feb 10, 2020
59ba7fe
Updated LightGBMPreviousModelBaselineTest
mstfbl Feb 10, 2020
5c79905
Update LightGBMPreviousModelBaselineTest
mstfbl Feb 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated test datasets and LightGbm flag shortnames
  • Loading branch information
mstfbl committed Feb 6, 2020
commit 6f54895c66eadd3d79299472d8a9b4b56a52df1e
4 changes: 2 additions & 2 deletions src/Microsoft.ML.LightGbm/LightGbmTrainerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ private protected OptionsBase() { }
/// <summary>
/// Whether to enable special handling of missing value or not.
/// </summary>
[Argument(ArgumentType.AtMostOnce, HelpText = "Enable special handling of missing value or not.")]
[Argument(ArgumentType.AtMostOnce, HelpText = "Enable special handling of missing value or not.", ShortName = "hmv")]
[TlcModule.SweepableDiscreteParam("UseMissing", new object[] { true, false })]
public bool HandleMissingValue = true;

/// <summary>
/// Whether to enable the usage of zero (0) as missing value.
/// </summary>
[Argument(ArgumentType.AtMostOnce, HelpText = "Enable usage of zero (0) as missing value.")]
[Argument(ArgumentType.AtMostOnce, HelpText = "Enable usage of zero (0) as missing value.", ShortName = "uzam")]
[TlcModule.SweepableDiscreteParam("UseZeroAsMissing", new object[] { true, false })]
public bool UseZeroAsMissingValue = false;

Expand Down
6 changes: 3 additions & 3 deletions test/Microsoft.ML.Predictor.Tests/TestPredictors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public void FastTreeBinaryClassificationTest()
public void LightGBMClassificationTest()
{
var learners = new[] { TestLearners.LightGBMClassifier };
var binaryClassificationDatasets = new List<TestDataset> { TestDatasets.breastCancerPipeMissing };
var binaryClassificationDatasets = new List<TestDataset> { TestDatasets.breastCancerPipe };
foreach (var learner in learners)
{
foreach (TestDataset dataset in binaryClassificationDatasets)
Expand All @@ -491,7 +491,7 @@ public void LightGBMClassificationTest()
public void GossLightGBMTest()
{
var binaryPredictors = new[] { TestLearners.LightGBMGoss };
var binaryClassificationDatasets = new List<TestDataset> { TestDatasets.breastCancerPipeMissing };
var binaryClassificationDatasets = new List<TestDataset> { TestDatasets.breastCancerPipe };
RunAllTests(binaryPredictors, binaryClassificationDatasets, extraTag: "goss");
Done();
}
Expand All @@ -502,7 +502,7 @@ public void GossLightGBMTest()
public void DartLightGBMTest()
{
var binaryPredictors = new[] { TestLearners.LightGBMDart };
var binaryClassificationDatasets = new List<TestDataset> { TestDatasets.breastCancerPipeMissing };
var binaryClassificationDatasets = new List<TestDataset> { TestDatasets.breastCancerPipe };
RunAllTests(binaryPredictors, binaryClassificationDatasets, extraTag: "dart");
Done();
}
Expand Down