Skip to content

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

Merged
merged 12 commits into from
Feb 13, 2019

Conversation

rogancarr
Copy link
Contributor

@rogancarr rogancarr commented Feb 11, 2019

This PR adds a test for training with a validation set.

Fixes #2499

@codecov
Copy link

codecov bot commented Feb 11, 2019

Codecov Report

Merging #2503 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            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
Flag Coverage Δ
#Debug 71.25% <100%> (ø) ⬆️
#production 67.57% <ø> (-0.01%) ⬇️
#test 85.36% <100%> (ø) ⬆️

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

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

:shipit:

@glebuk glebuk self-requested a review February 12, 2019 18:34
var preprocessedValidData = preprocessor.Transform(validData);

// Train the model with a validation set
var trainedModel = mlContext.Regression.Trainers.FastTree(numTrees: 2)
Copy link
Contributor

@glebuk glebuk Feb 12, 2019

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
Copy link
Contributor

@glebuk glebuk Feb 12, 2019

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

Copy link
Contributor

@glebuk glebuk left a comment

Choose a reason for hiding this comment

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

:shipit:

@rogancarr rogancarr merged commit e818e35 into dotnet:master Feb 13, 2019
@rogancarr rogancarr deleted the 2499_validation_scenario_tests branch February 13, 2019 02:14
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 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