def populate_features(self):
        tasks = Classifier.populate_features(self)

        # Add classifier tasks
        clf1 = LogisticRegression(solver='lbfgs',
                                  multi_class='multinomial',
                                  max_iter=100,
                                  random_state=1)
        clf2 = RandomForestClassifier(n_estimators=100, criterion='entropy')
        clf3 = SVC(kernel='linear', probability=True)

        tasks.append(('clf',
                      VotingClassifier(estimators=[('lr', clf1), ('rf', clf2),
                                                   ('svm', clf3)],
                                       voting='soft',
                                       weights=[4, 2, 5])))
        self.pipeline = Pipeline(tasks)
Exemplo n.º 2
0
 def populate_features(self):
     tasks = Classifier.populate_features(self)
     tasks.append(('clf',
                   RandomForestClassifier(n_estimators=100,
                                          criterion='entropy')))
     self.pipeline = Pipeline(tasks)
Exemplo n.º 3
0
 def populate_features(self):
     tasks = Classifier.populate_features(self)
     tasks.append(('clf', LinearSVC()))
     self.pipeline = Pipeline(tasks)