-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Typed SDCA binary trainers #2506
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
Conversation
028d090
to
27536c3
Compare
cc7766d
to
b6135a9
Compare
Codecov Report
@@ Coverage Diff @@
## master #2506 +/- ##
==========================================
- Coverage 71.26% 71.24% -0.02%
==========================================
Files 798 798
Lines 141231 141236 +5
Branches 16112 16108 -4
==========================================
- Hits 100642 100627 -15
- Misses 36119 36143 +24
+ Partials 4470 4466 -4
|
Codecov Report
@@ Coverage Diff @@
## master #2506 +/- ##
=========================================
Coverage ? 71.24%
=========================================
Files ? 798
Lines ? 141236
Branches ? 16108
=========================================
Hits ? 100627
Misses ? 36143
Partials ? 4466
|
test/BaselineOutput/SingleDebug/SDCA/BinarySDCA-SmoothedHinge-CV-breast-cancer-out.txt
Outdated
Show resolved
Hide resolved
test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs
Outdated
Show resolved
Hide resolved
test/BaselineOutput/SingleDebug/SDCALR/BinarySDCA-CV-breast-cancer-out.txt
Outdated
Show resolved
Hide resolved
Fix some tests failed because of duplicated load names
1. Remove arguments to set up calibrator in all SDCA trainer 2. Clean up entry point base on argument's changes. 3. Update test files
407bdde
to
267c387
Compare
docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCANonCalibrated.cs
Outdated
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SDCA.cs
Outdated
Show resolved
Hide resolved
|
||
namespace Microsoft.ML.Samples.Dynamic | ||
{ | ||
public class SDCASupportVectorMachine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDCASupportVectorMachine [](start = 17, length = 24)
This is a static class right? (Only if you happen to post another commit after this.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully #2548 can fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @wschin, this is definitely a strong step in the right direction. (And incidentally one of the last things I need to actually get rid of IPredictorProducing
. 😄)
Thank you @TomFinley. |
Make
SdcaBinaryTrainer
strongly-typed according to the type it produces. The existingSdcaBinaryTrainer
can produce either calibrated linear model or linear model as mentioned in #2469. To fix #2469, we move common functionalities used in both cases toSdcaBinaryTrainerBase<T>
whereT
isCalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator
for calibrated case andLinearBinaryModelParameters
otherwise. Top-level APIs are changed accordingly. For dynamic/static APIs, we have 4 SDCA binary trainers forIn addition, because we don't like auto-calibration, the output schema in uncalibrated cases should not contain a probability column. This PR also fixes this in the two derived trainer classes'
ComputeSdcaBinaryClassifierSchemaShape
; the only case with a probability column generated is training logistic regression with Sdca. We also have two separatedSdcaCalibratedBinaryTrainer.Options
andSdcaBinaryTrainer.Options
derived fromBinaryArgumentBase
. Legacy command-line tool and entry points are not affected by havingLegacySdcaBinaryTrainer
.