// feat_idx: starting from 1 to nr_feature
// label_idx: starting from 0 to nr_class-1 for classification models;
-// for regression models, label_idx is ignored.
+// for regression and one-class SVM models, label_idx is
+// ignored.
double get_decfun_coef(const struct model *model_, int feat_idx, int label_idx)
{
if(feat_idx > model_->nr_feature)
>>> b = model_.get_decfun_bias()
>>> [W, b] = model_.get_decfun()
- For one-class SVM models, label_idx is ignored and b=-rho is returned. That
- is, the decision function is w*x+b=w*x-rho.
+ For one-class SVM models, label_idx is ignored and b=-rho is
+ returned from get_decfun(). That is, the decision function is
+ w*x+b = w*x-rho.
>>> rho = model_.get_decfun_rho()
- >>> [W, rho] = model_.get_decfun()
+ >>> [W, b] = model_.get_decfun()
Note that in get_decfun_coef, get_decfun_bias, and get_decfun, feat_idx
starts from 1, while label_idx starts from 0. If label_idx is not in the