Exemplo n.º 1
0
 def _d_svm_indices(self):
     classifier = LinearSVC()
     return MisclassificationIndices.calculate(classifier,
                                               BowDataset(
                                                   self._tfidf_matrix(),
                                                   self._classes),
                                               n_folds=10)['inds']
Exemplo n.º 2
0
 def _d_rf_indices(self):
     classifier = RandomForestClassifier()
     return MisclassificationIndices.calculate(classifier,
                                               BowDataset(
                                                   self._tfidf_matrix(),
                                                   self._classes),
                                               n_folds=10)['inds']
Exemplo n.º 3
0
 def _d_cs_indices(self):
     classifier = NearestCentroid(metric='cosine')
     #classifier=KNeighborsClassifier(n_neighbors=5)
     return MisclassificationIndices.calculate(classifier,
                                               BowDataset(
                                                   self._tfidf_matrix(),
                                                   self._classes),
                                               n_folds=10)['inds']
Exemplo n.º 4
0
 def _d_svm_indices(self):
     classifier = LinearSVC()
     return MisclassificationIndices.calculate(classifier,
                                               BowDataset(self._tfidf_matrix(),self._classes),
                                               n_folds=10)['inds']
Exemplo n.º 5
0
 def _d_rf_indices(self):
     classifier = RandomForestClassifier()
     return MisclassificationIndices.calculate(classifier,
                                               BowDataset(self._tfidf_matrix(),self._classes),
                                               n_folds=10)['inds']
Exemplo n.º 6
0
 def _d_cs_indices(self):
     classifier=NearestCentroid(metric='cosine')
     #classifier=KNeighborsClassifier(n_neighbors=5)
     return MisclassificationIndices.calculate(classifier,
                                               BowDataset(self._tfidf_matrix(),self._classes),
                                               n_folds=10)['inds']