{{ message }}

Instantly share code, notes, and snippets.

# John DeJesusJohnDeJesus22

Created Jul 19, 2020
fowlkes-mallows index
View fmi.py
 recall = cm[1,1]/(cm[1,1] + cm[1,0]) precision = cm[1,1]/(cm[1,1] + cm[0, 1]) fmi = sqrt(precision * recall)
Created Jul 19, 2020
prevalence threshold
View prevalence_threshold.py
 recall = cm[1,1]/(cm[1,1] + cm[1,0]) specificity = cm[0,0]/(cm[0,0] + cm[0,1]) numerator = sqrt(recall * (-specificity+1)) + specificity - 1 denominator = recall + specificity - 1 prevalence_threshold = numerator/denominator
Created Jul 19, 2020
Matthew's correlation coefficient
View mcc.py
 numerator = (cm[1,1] * cm[0,0]) - (cm[0,1] * cm[1,0]) denominator = sqrt((cm[1,1] + cm[0,1]) * (cm[1,1] + cm[1,0]) * (cm[0,0] + cm[0,1]) * (cm[0,0] + cm[1,0])) mcc = numerator/denominator
Created Jul 19, 2020
markedness
View markedness.py
 precision = cm[1, 1]/(cm[1,1] + cm[0, 1]) negative_predictive_value = cm[0, 0]/(cm[0,0] + cm[1,0]) markedness = precision + negative_predictive_value - 1
Created Jul 19, 2020
informdness
View informedness.py
 recall = cm[1, 1]/(cm[1,1] + cm[1,0]) specificity = cm[0, 0]/(cm[0,0] + cm[0,1]) informedness = recall + specificity - 1
Created Jul 18, 2020
f1score
View f_one-score.py
 precision = cm[1,1]/(cm[1,1] + cm[0,1]) recall = cm[1,1]/(cm[1,1] + cm[1,0]) numerator = precision*recall denominator = precision + recall f1_score = 2* numerator/denominator
Created Jul 18, 2020
balance accuracy
View ba.py
 recall = cm[1,1]/(cm[1,1] + cm[1,0]) specificity = cm[0,0]/(cm[0,0] + cm[0,1]) balanced_accuracy = (recall + specificity)/2
Created Jul 18, 2020
critical success index
View csi.py
 numerator = cm[1, 1] denominator = cm[1, 1] + cm[1, 0] + cm[0, 1] critical_success_index = numerator/denominator
Created Jul 18, 2020
false omission rate
View fmr
 numerator = cm[1, 0] denominator = cm[1, 0] + cm[0, 0] false_omission_rate = numerator/denominator
Created Jul 18, 2020
false discovery rate
View fdr.py
 numerator = cm[0, 1] denominator = cm[0, 1] + cm[1, 1] false_discovery_rate = numerator/denominator
You can’t perform that action at this time.