Last active
November 26, 2019 06:51
-
-
Save AFAgarap/ac366b7499d26254920e5595a8950a99 to your computer and use it in GitHub Desktop.
Canonical computation of trust score for model predictions. Link to blog: https://towardsdatascience.com/how-can-i-trust-you-fb433a06256c?source=friends_link&sk=0af208dc53be2a326d2407577184686b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from trustscore import TrustScore | |
ts = TrustScore(alpha=5e-2) | |
ts.fit(encoded_train_features, train_labels) | |
trust_score, closest_class_not_predicted = ts.score( | |
encoded_test_features, predictions, k=5 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment