def _d_svm_indices(self): classifier = LinearSVC() return MisclassificationIndices.calculate(classifier, BowDataset( self._tfidf_matrix(), self._classes), n_folds=10)['inds']
def _d_rf_indices(self): classifier = RandomForestClassifier() return MisclassificationIndices.calculate(classifier, BowDataset( self._tfidf_matrix(), self._classes), n_folds=10)['inds']
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']
def _d_svm_indices(self): classifier = LinearSVC() return MisclassificationIndices.calculate(classifier, BowDataset(self._tfidf_matrix(),self._classes), n_folds=10)['inds']
def _d_rf_indices(self): classifier = RandomForestClassifier() return MisclassificationIndices.calculate(classifier, BowDataset(self._tfidf_matrix(),self._classes), n_folds=10)['inds']
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']