Skip to content

Commit

Permalink
Remove broken algorithm option
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Oct 10, 2024
1 parent 051369d commit 58e95ee
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/resspect/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,11 +950,12 @@ def classify(self, method: str, save_predictions=False, pred_dir=None,
self.predicted_class, self.classprob, self.classifier = \
random_forest(self.train_features, self.train_labels,
self.pool_features, **kwargs)

elif method == 'GradientBoostedTrees':
self.predicted_class, self.classprob, self.classifier = \
gradient_boosted_trees(self.train_features, self.train_labels,
self.pool_features, **kwargs)
raise ValueError("GradientBoostedTrees is currently unimplemented.")
# TODO: Restore once GradientBoostedTrees is fixed.
# self.predicted_class, self.classprob, self.classifier = \
# gradient_boosted_trees(self.train_features, self.train_labels,
# self.pool_features, **kwargs)
elif method == 'KNN':
self.predicted_class, self.classprob, self.classifier = \
knn(self.train_features, self.train_labels,
Expand All @@ -972,10 +973,10 @@ def classify(self, method: str, save_predictions=False, pred_dir=None,
nbg(self.train_features, self.train_labels,
self.pool_features, **kwargs)
else:
raise ValueError("The only classifiers implemented are" +
"'RandomForest', 'GradientBoostedTrees'," +
"'KNN', 'MLP' and NB'." +
"\n Feel free to add other options.")
raise ValueError(
"The only classifiers implemented are 'RandomForest', 'KNN', 'MLP', "
"'SVM' and 'NB'.\nFeel free to add other options."
)

# estimate classification for validation sample
self.validation_class = \
Expand Down Expand Up @@ -1213,10 +1214,10 @@ def make_query_budget(self, budgets, strategy='UncSampling', screen=False) -> li
Budgets for 4m and 8m respectively.
strategy: str (optional)
Strategy used to choose the most informative object.
Current implementation accepts 'UncSampling' and
Current implementation accepts 'UncSampling'
'RandomSampling', 'UncSamplingEntropy',
'UncSamplingLeastConfident', 'UncSamplingMargin',
'QBDMI', 'QBDEntropy', . Default is `UncSampling`.
'QBDMI', and 'QBDEntropy'. Default is `UncSampling`.
screen: bool (optional)
If true, display on screen information about the
displacement in order and classificaion probability due to
Expand Down

0 comments on commit 58e95ee

Please sign in to comment.