SVM分类:置信区间

时间:2015-12-29 00:32:37

标签: scikit-learn svm

是否有可能从sklearn的svm实施中获得Z分数?

所以,如果它将输入X分类为[0,1,0,1,1,1,0,0,0],你能得到输出:[0.5,0.78,0.95,0.11,0.34,。 ..],这些是学习者在预测中的估计置信度?

如果我自己实施,我是否可以提取此信息,还是会变成一个巨大的项目?

1 个答案:

答案 0 :(得分:3)

据我所知,SVM没有封闭形式的Z分数,但是如果你使用参数probability=True创建predict_proba,它将包含一个使用交叉验证构建的概率模型,您可以使用override func viewDidLoad() { var lit = [b0o,b1o,b2o,b3o,b4o,b5o,b6o,b7o,b8o] var litIndex = 0 super.viewDidLoad() for i in 1...10{ print(randomIndex) print(computerChoices) var buttonChoice = lit[randomIndex] randomIndex = Int(arc4random_uniform(UInt32(lit.count))) computerChoices[i] = randomIndex print("yoyoyo") self.view.setNeedsDisplay() timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: Selector("flashingButtons"), userInfo: nil, repeats: true) } } func flashingButtons(){ var lit = [b0o,b1o,b2o,b3o,b4o,b5o,b6o,b7o,b8o] one = computerChoices[pcChoice] lit[one].setImage(UIImage(named: "redb.png"), forState: UIControlState.Normal) pcChoice += 1 if pcChoice == 10{ timer.invalidate() } } 访问该模型,以估计预测的置信度。

相关问题