Skip to content

Commit

Permalink
Remove SVM regression modes. Fixes irllabs#154
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Bullock committed Feb 17, 2019
1 parent f8212fb commit b7e0141
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion sources/classification/ml_svm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,22 @@ namespace ml
void svm::set_type(int type)
{
GRT::SVM::SVMType type_ = GRT::SVM::SVMType::C_SVC;
const std::string error_msg = "invalid SVM type, send a 'help' message to the first inlet for available types";

try
{
type_ = get_grt_svm_type(type);
}
catch (std::exception& e)
{
post("invalid SVM type, send a 'help' message to the first inlet for available types");
post(error_msg);
return;
}

// TODO: implement SVM regression
if (type_ == GRT::SVM::SVMType::EPSILON_SVR || GRT::SVM::SVMType::NU_SVR)
{
post(error_msg);
return;
}

Expand Down
6 changes: 3 additions & 3 deletions sources/ml_doc_populate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ namespace ml_doc
" 0:C-SVC (multi-class),"
" 1:nu-SVC (multi-class),"
" 2:one-class SVM,"
" 3:epsilon-SVR (regression),"
" 4:nu-SVR (regression)"
// " 3:epsilon-SVR (regression),"
// " 4:nu-SVR (regression)"
,
0,
4,
2,
0
// " 0 -- C-SVC (multi-class classification)\n"
// " 1 -- nu-SVC (multi-class classification)\n"
Expand Down

0 comments on commit b7e0141

Please sign in to comment.