cui-unige / mcc4mcc

Model Checker Collection for the Model Checking Contest @ Petri nets
https://cui-unige.github.io/mcc4mcc/
MIT License
4 stars 0 forks source link

Add voting between classifier results #29

Closed saucisson closed 6 years ago

saucisson commented 6 years ago

Try to enhance results by voting among the results of several algorithms.

saucisson commented 6 years ago

The result of voting seems to be always less efficient than the best algorithm.

petitgrizzlies commented 6 years ago

It's possible.

Imagine this case :

Let imagine that algo 1 vote for class 1 which is the good answer. algo 2 and algo 3 vote for the class 2. The results will be the class 2 : the bad answer.

petitgrizzlies commented 6 years ago

I got improvement of score with this :

    ALGORITHMS["voting-classifier"] = lambda _: VotingClassifier(
        [
            ("decision-tree", DecisionTreeClassifier()),
            ("random-forest", RandomForestClassifier(
                n_estimators=30,
                max_features=None,
            )),
            ("svm", SVC(probability=True))
        ],
        voting='soft'
    )