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
cross validation classification meta example #4151
cross validation classification meta example #4151
Conversation
@@ -0,0 +1,30 @@ | |||
CSVFile f_feats("../../data/fm_train_real.dat") |
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.
just call it: cross_validation_support_vector_machine.sg
#![create_cross_validation] | ||
|
||
#![evaluate_and_get_result] | ||
CrossValidationResult result() |
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 can be in a single line
StratifiedCrossValidationSplitting splitting_strategy(labels, 5) | ||
AccuracyMeasure evaluation_criterium() | ||
CrossValidation cross(svm, features, labels, splitting_strategy, evaluation_criterium) | ||
cross.set_autolock(False) |
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.
no need as this is not a kernel machine? Or does it produce warnings?
|
||
#![create_cross_validation] | ||
StratifiedCrossValidationSplitting splitting_strategy(labels, 5) | ||
AccuracyMeasure evaluation_criterium() |
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.
evaluation_criterion
svm.set_liblinear_solver_type(enum LIBLINEAR_SOLVER_TYPE.L2R_L2LOSS_SVC) | ||
#![create_classifier] | ||
|
||
#![create_cross_validation] |
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.
the comments are only necessary if you write a cookbook page (you can leave them for now though)
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.
few updates and this is good to go
4c66531
to
9eadcd2
Compare
@karlnapf does this look okay? |
It does :) |
#3000 making meta for undocumented cross validation classification example. if this is okay how about we write a cookbook page?