Closed erikr closed 8 years ago
I don't think your change is correct. Yours implies that we must do
m = svmtrain(y,x,)
even if default parameters are used
Erik Reinertsen writes:
I think the square bracket should wrap the string 'libsvm_options', and the comma should separate that string argument from the prior argument training_instance_matrix.
But I could be wrong! Just checking...
You can view, comment on, or merge this pull request online at:
https://github.com/cjlin1/libsvm/pull/64
Commit Summary
- Corrected typo in argument syntax for calling svmtrain.m
File Changes
- M matlab/README (6)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub*
Thanks for the response.
I now see you are employing square brackets for optional arguments. That is confusing syntax given the standard use of square brackets for declaring vectors in Matlab.
Clearer documentation should be explicit with the optionality of the third argument, to be consistent with how native functions in Matlab are documented:
matlab> model = svmtrain(training_label_vector, training_instance_matrix);
matlab> model = svmtrain(training_label_vector, training_instance_matrix, 'libsvm_options);
I will close this and make a new pull request so you can see the proposed changes.
The goal is to improve the clarity of the documentation.
Thanks again for your time to review this!
@cjlin1 I think the square bracket should wrap the string
libsvm_options
, and the comma should separate that string argument from the prior argumenttraining_instance_matrix
.But I could be wrong! Just checking...