python支持向量机回归,在python中使用SVM的回归置信度

I'm using regression SVMs in python and I am wondering if there is any way to get a "confidence-measure" value for its predictions.

Previously, when using SVMs for binary classification, I was able to compute a confidence-type value from the 'margin'. Here is some pseudo-code showing how I got a confidence value:

# Begin pseudo-code

import svm as svmlib

prob = svmlib.svm_problem(labels, data)

param = svmlib.svm_parameter(svm_type=svmlib.C_SVC, kernel_type = svmlib.RBF)

model = svmlib.svm_model(prob, param)

# get confidence

confidence = self.model.predict_values_raw(sample_to_classify)

I imagine that the further the new sample is from the training data, the worse the confidence, but I'm looking for a function that might help compute a reasonable estimate for this.

My (high-level) problem is as follows:

I have a function F(x), where x is a high-dimensional vector

F(x) can be computed but it is very slow

I want to train a regression SVM to approximate it

If I can find values of 'x' that have low prediction confidence, I can add these points and retrain (aka. active learning)

Has anyone obtained/used regression-SVM confidence/margin values before?

解决方案

Have a look at this similar response on Stack back in January. The chosen answer was spot on regarding how hard it is to get confidence measures on non-parametric fitting methods. There's probably some Bayesian type thing you could do, but that's probably not possible with the Python SVM library: Prefer one class in libsvm (python).

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值