简体   繁体   English

如何在MATLAB中的MLP或SVM中计算平均输出概率

[英]How calculate average output probabilities in MLP or SVM in MATLAB

I have a system that find best model (best inputs and parameters of MLP/SVM) model in a financial problem for every inserted database and create a specific model for a specific data sample. 我有一个系统,可以为每个插入的数据库在财务问题中找到最佳模型(MLP / SVM的最佳输入和参数)模型,并为特定数据样本创建特定模型。 I'm using 5-fold cross validation that repeats for 5 times (for increasing reliability of my system) for cost function of my optimization algorithm so In the end I will find best 25 models that now will use for out-sample data. 我正在使用5倍交叉验证,对我的优化算法的成本函数重复5次(以提高系统的可靠性),因此最终我将找到现在将用于样本外数据的最佳25个模型。

When I insert out sample data to these 25 models in some cases I have slightly different outputs ( I have a classification MLP model that can generate probability). 在某些情况下,当我将样本数据插入到这25个模型中时,我的输出会略有不同(我有一个可以生成概率的分类MLP模型)。 This is one of the outputs : 这是输出之一:

0.380032703, 0.356491904, 0.369914169, 0.377588996, 0.425321986 ,0.382467546, 0.341404809, 0.538460421, 0.353585952, 0.332340499, 0.36827261, 0.369171894, 0.329522399, 0.398054125, 0.360501952, 0.406897298, 0.480889919, 0.403619213, 0.406236551, 0.422529236, 0.393108809, 0.309808029, 0.357776713, 0.337373411, 0.397259506

As you know these outputs have difference parts of data as training sets and testing sets for creating model. 如您所知,这些输出将数据的不同部分作为训练集和测试集用于创建模型。 Other things like inputs and parameters are the same.I should have only one probability for any out sample. 输入和参数之类的其他东西都是相同的,任何外采样我应该只有一个概率。 My fist approach was using average. 我的拳头方法是使用平均数。 I want your suggestions to create one robust probability from these probabilities. 我希望您的建议从这些概率中创建一个可靠的概率。 When I check other out sample outputs, In a lot of cases difference is low but in some cases difference between probabilities is high. 当我检查其他样本输出时,在很多情况下差异很小,但在某些情况下概率之间差异很大。

What is your idea about this problem? 您对这个问题有什么想法?

Thanks. 谢谢。

You should weight the outputs according to how much you believe that the model which generated the output is correct. 您应该根据您认为生成输出的模型正确的程度对输出进行加权。 If you have no reason to prefer any of the models, then they all have the same weight (namely 1/(number of models)), and the combined output is just the mean of the individual outputs. 如果您没有理由偏爱任何一个模型,那么它们都具有相同的权重(即1 /(模型数)),并且组合输出只是各个输出的平均值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM