Commit e9045e61 authored by Imène Lajili's avatar Imène Lajili

fix set binary threshold from skew widget

parent 44c40162
from math import floor
def ca_set_binary_threshold_from_skew(input_dict):
import math
cost_false_pos = input_dict['cost_false_pos']
cost_false_neg = input_dict['cost_false_neg']
ratio_pos_neg = input_dict['ratio_pos_neg']
output_dict = {}
output_dict['bin_thres'] = float(ratio_pos_neg) * (float(cost_false_neg) / float(cost_false_pos))
output_dict['bin_thres'] = math.log10(float(ratio_pos_neg) * (float(cost_false_neg) / float(cost_false_pos)))
return output_dict
def ca_estimate_pos_neg_from_prd_fct(input_dict):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment