Skip to content
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

Conversation

shubham808
Copy link
Contributor

#3000 making meta for undocumented cross validation classification example. if this is okay how about we write a cookbook page?

@@ -0,0 +1,30 @@
CSVFile f_feats("../../data/fm_train_real.dat")
Copy link
Member

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()
Copy link
Member

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)
Copy link
Member

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()
Copy link
Member

@karlnapf karlnapf Feb 5, 2018

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]
Copy link
Member

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)

Copy link
Member

@karlnapf karlnapf left a 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

@shubham808 shubham808 force-pushed the feature/cross_validation_classification_meta_example branch from 4c66531 to 9eadcd2 Compare February 5, 2018 18:13
@shubham808
Copy link
Contributor Author

@karlnapf does this look okay?

@karlnapf
Copy link
Member

karlnapf commented Feb 6, 2018

It does :)

@karlnapf karlnapf merged commit 6e6cf75 into shogun-toolbox:develop Feb 6, 2018
ktiefe pushed a commit to ktiefe/shogun that referenced this pull request Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants