matlab svm

https://cn.mathworks.com/help/stats/support-vector-machines-for-binary-classification.html#bsr5ovw-1


使用支持向量机

    与任何监督式学习模型一样,您首先训练支持向量机,然后交叉验证分类器。 使用训练好的机器对新数据进行分类(预测)。 另外,为了获得令人满意的预测准确性,您可以使用各种SVM内核函数,并且必须调整内核函数的参数。


1、训练SVM分类器

    使用fitcsvm训练并选择交叉验证SVM分类器,最常用的语法是:

SVMModel = fitcsvm(X,Y,'KernelFunction','rbf',...
    'Standardize',true,'ClassNames',{'negClass','posClass'});
The inputs are:
  • X — Matrix of predictor data, where each row is one observation, and each column is one predictor.
    预测变量数据矩阵,每行是一个观察值,每列是一个预测变量
  • Y — Array of class labels with each row corresponding to the value of the corresponding row in X. Y can be a character array, categorical, logical or numeric vector, or cell vector of character vectors. Column ve
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值