Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sprout/SPROUTObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def exercise(self, x, y, classifier, verbose=True):
print('Unable to load SPROUT model')
return out_df, clf_pred

def predict_misclassifications(self, x, classifier, verbose=True) -> numpy.ndarray:
def predict_misclassifications(self, x, classifier, verbose=True) -> numpy.ndarray:
"""
Predicts on a test set
:param x: the test features x_test
Expand All @@ -437,9 +437,9 @@ def predict_misclassifications(self, x, classifier, verbose=True) -> numpy.ndarr
if self.binary_adjudicator is not None:
# Calculating Trust Measures with SPROUT
unc_m = self.compute_set_trust(data_set=x, classifier=classifier, verbose=verbose)
x_test = unc_m.select_dtypes(exclude=['object']).to_numpy()
x_test = numpy.nan_to_num(x_test)
misc_pred = self.binary_adjudicator.predict(x_test)
x = unc_m.select_dtypes(exclude=['object']).to_numpy()
x = numpy.nan_to_num(x)
misc_pred = self.binary_adjudicator.predict(x)
return misc_pred
else:
print("Adjudicator is not trained")
Expand Down