def get_binary(values, threshold, target):
    """
    Transforms continuous or multiclass values into binary values (0/1)

    Args:
        values (list): vector of the target values
        threshold (int or float): threshold used to assign a binary value
                                0 is assigned to 'bad' values;
                                1 is assigned to 'good' values
        target (string): target (y)
                        if target is 'fnat' or 'bin_class': target value > threshold = 1
                        esle: target value > threshold = 0

    Returns:
        list: list of binary values
    """
    inverse = ['fnat', 'bin_class']
    if target in inverse:
        values_binary = [1 if x > threshold else 0 for x in values]
    else:
        values_binary = [1 if x < threshold else 0 for x in values]

    return values_binary