我有两套特性可以预测相同的输出。但是,我不想马上训练每件事,我想把它们分开训练,并把决定融合在一起。在支持向量机的分类中,我们可以获取可用于训练另一个SVM的类的概率值。但在SVR里,我们怎么能做到呢?
有什么想法吗?
谢谢:)
发布于 2014-04-28 15:47:43
这里有几种选择。最受欢迎的两个是:
(一)
建立这两个模型,并简单地将结果平均。
它在实践中往往效果很好。
(二)
你可以用一种非常相似的方式去做,就像当你有概率的时候。问题是,你需要控制过拟合的.What我的意思是,它是“危险的”产生一个分数与一组特征,并适用于另一个标签是完全相同的以前(即使新的特征是不同的)。这是因为新的应用分数是在这些标签上训练的,因此过于适合它(超性能)。
通常您使用的是交叉验证
在你的情况下
一些psedo代码:
randomly split 50-50 both train_set_1 and train_set_2 at exactly the same points along with the Y (output array)所以现在你有:
a.train_set_1 (50% of training_set_1)
b.train_set_1 (the rest of 50% of training_set_1)
a.train_set_2 (50% of training_set_2)
b.train_set_2 (the rest of 50% of training_set_2)
a.Y (50% of the output array that corresponds to the same sets as a.train_set_1 and a.train_set_2)
b.Y (50% of the output array that corresponds to the same sets as b.train_set_1 and b.train_set_2)这是关键的部分
Build a svr with a.train_set_1 (that contains X1 features) and output a.Y and
Apply that model's prediction as a feature to b.train_set_2 .
By this I mean, you score the b.train_set_2 base on your first model. Then you take this score and paste it next to your a.train_set_2 .So now this set will have X2 features + 1 more feature, the score produced by the first model.
Then build your final model on b.train_set_2 and b.Y 新的模型,虽然使用的分数产生的training_set_1,但它仍然这样做的不偏不倚的方式,因为后者从来没有在这些标签上训练!
您可能还会发现这个纸非常有用
https://stackoverflow.com/questions/23282715
复制相似问题