首页 > 解决方案 > 如何在 R 中为单调(非递减)函数实现 SVM?

问题描述

我有一个简单的回归方程,类似于

svm_cv<-tune( svm,
              count~day_index, 
              kernel="radial", 
              scale=TRUE,
              data=bdata,
              ranges=list(cost=2^(-8:8),
                          gamma=2^(-8:8))
)

现在,当我绘制从模型做出的预测时,我可以看到的增加是不正确的,因此值count永远不会减少day_indexsvm_cv$best.model

如何在 R 中应用此限制?

标签: rmachine-learningdata-sciencesvm

解决方案


对于任何有相同要求的人: reddit 用户uzzler10向我指出了isoreg库,它似乎已经完成了我需要的操作

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/isoreg.html


推荐阅读