[英]Combining Two Classification Models
I'm new with machine learning, I have labeled data with 0 for normal and 1 for attack, The idea is like this:我是机器学习的新手,我将数据标记为 0 表示正常,1 表示攻击,想法是这样的:
I want to build a model that apply DT in the first level.我想构建一个在第一级应用 DT 的模型。 The output from DT will be Either Normal or attack. DT 的输出将是 Normal 或 Attack。 Firstly if the data classified as attack by DT we alert, Secondly, if the data classified as a normal, we take the normal data and fed it to the second model (SVM) to double check if normal or attack.首先,如果数据被 DT 归类为攻击,我们会发出警报,其次,如果数据归类为正常,我们将正常数据输入到第二个模型(SVM)中,以仔细检查是否正常或攻击。
I have read about ensemble learning, but most of these methods combine the models and take the average or weighting, Any idea how can we implement this?我已经阅读了关于集成学习的内容,但是这些方法中的大多数都将模型结合起来并取平均值或加权,知道我们如何实现这一点吗? Thanks谢谢
You defined a rule for combining the two models, but why don't you let a model learn this rule?你定义了一个规则来组合两个模型,但为什么不让模型学习这个规则呢?
You can train both DT and SVM on all the data.您可以在所有数据上训练 DT 和 SVM。 Then, take the output of both (the probability of normal), and feed this to another model (a DT for example) that will predict the final prediction.然后,获取两者的输出(正常概率),并将其提供给另一个将预测最终预测的模型(例如 DT)。
In this way the last model (which is called super model), can learn if the right way to combine the models is average/weighting/max/min or your rule...通过这种方式,最后一个模型(称为超级模型)可以了解组合模型的正确方法是平均值/权重/最大值/最小值还是您的规则......
I hope it helps 😄我希望它有帮助😄
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.