Best way to combine probabilistic classifiers in scikit-learn

前端 未结 4 801
误落风尘
误落风尘 2021-01-30 11:46

I have a logistic regression and a random forest and I\'d like to combine them (ensemble) for the final classification probability calculation by taking an average.

Is t

4条回答
  •  伪装坚强ぢ
    2021-01-30 12:16

    What about the sklearn.ensemble.VotingClassifier?

    http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier

    Per the description:

    The idea behind the voting classifier implementation is to combine conceptually different machine learning classifiers and use a majority vote or the average predicted probabilities (soft vote) to predict the class labels. Such a classifier can be useful for a set of equally well performing model in order to balance out their individual weaknesses.

提交回复
热议问题