matlab与cuda有对应关系么,有没有可以和MATLAB集成在CUDA上跑的SVM?

本帖最后由 蓝云风翼 于 2013-10-11 11:03 编辑

Download preconfigure cuSVM Visual Studio 2010 solution with LibSVM and matlab scritp for classification。

你需要做的是将cuSVM 中的 cuSVMTrain。mexw32 和cuSVMPredict。mexw32添加到MATLAB path中去,mexw32在附件中的cusvmexw32中,此外你也可以通过release模式生成mexw文件在附件cuSVM中

cuSVMTrain。

用法:[alphas,beta,svs]=cuSVMTrain(y,train,C,kernel,eps, (optional) stoppingcrit)

输出:

1。 alphas is a single-precision vector of the support vector coecients。

2。 beta is a single-precision scalar, the oset b in the SVM prediction function。

3。 svs is a single-precision matrix of the support vectors corresponding to

alphas, i。

e。 the support vector found in row i of svs has the coecient in

the SVM prediction function found in row i of alphas。

输入:

1。

y is a single-precision vector of training outputs。 If you are classifying,

these must be either 1 or -1。 In regression, these are generally continuously

valued。

2。 train is a single-precision matrix of training data corresponding to y。

3。 C is the scalar SVM regularization parameter。

4。 kernel is the scalar Gaussian kernel parameter, i。e。 lamda in exp(-lamda||x-z||。^2)。

5。 eps is in -Support Vector Regression。

If you want to classify rather than

regress, set eps to empty, i。e [ ]。

6。 stoppingcrit is an optional scalar argument that one can use to specify the

optimization stopping criterion。

By default, the stopping criterion is set to

0。001。

cuSVMPredict。 用法:

prediction=cuSVMPredict(test,svs,alphas,beta,kernel,regind)

输出:

1。

prediction is a single-precision vector of predictions。

Inputs:

1。 test is a single-precision matrix of test data。

2。

svs is the single-precision matrix of support vectors output by cuSVMTrain。

3。 alphas is the single-precision vector of support vector coecients output by

cuSVMTrain。

4。 beta is the single-precision scalar oset output by cuSVMTrain。

5。 kernel is the same scalar Gaussian kernel parameter value previously used

in cuSVMTrain。

6。 regind is a scalar indicator variable that tells cuSVMPredict whether you

are classifying or regressing。 Set regind to 0 if the former and 1 if the latter。

全部

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值