def get_weight(class_dict):
    values = np.array(list(class_dict.values())).astype(float)
    weights = np.zeros_like(values)
    print(values)
    sum = values.sum()
    for (i, v) in enumerate(values):
        values[i] /= sum
    max = values.max()
    for (i, v) in enumerate(values):
        weights[i] = (max / values[i])
    weights_dict = dict(zip(class_dict.keys(), weights.tolist()))
    return weights_dict
def get_weight(class_dict):
    values = np.array(list(class_dict.values())).astype(float)
    weights = np.zeros_like(values)
    print(values)
    sum = values.sum()
    for (i, v) in enumerate(values):
        values[i] /= sum
    max = values.max()
    for (i, v) in enumerate(values):
        weights[i] = (max / values[i])
    weights_dict = dict(zip(class_dict.keys(), weights.tolist()))
    return weights_dict