-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add validation scenario tests #2503
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
Add validation scenario tests #2503
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2503 +/- ##
==========================================
+ Coverage 71.25% 71.25% +<.01%
==========================================
Files 798 797 -1
Lines 141252 141270 +18
Branches 16112 16112
==========================================
+ Hits 100643 100658 +15
- Misses 36145 36151 +6
+ Partials 4464 4461 -3
|
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.
var preprocessedValidData = preprocessor.Transform(validData); | ||
|
||
// Train the model with a validation set | ||
var trainedModel = mlContext.Regression.Trainers.FastTree(numTrees: 2) |
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.
trainedModel [](start = 16, length = 12)
add early stopping criteria in the options so that the validation set is actually useful.
Such as https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.trainers.fasttree.boostedtreeargs.earlystoppingrule?view=ml-dotnet #Closed
// Combine the model | ||
var model = preprocessor.Append(trainedModel); | ||
|
||
// Score the data sets |
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.
sets [](start = 30, length = 4)
periods at the end of comments throughout. #Closed
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.
This PR adds a test for training with a validation set.
Fixes #2499