def train_kwargs(penalty, C, weight):
    """
    Produce a keyword dictionary, from hyperparameter values
    :param penalty: type of regularisation
    :param C: inverse strength of regularisation
    :param weight: how to weight each training point
        - None for equal total weight for positive and negative instances
        - float for amount of smoothing
    """
    if weight is None:
        option = 'balanced'
    else:
        option = 'smoothed'
    return {'penalty': penalty,
            'C': C,
            'weight_option': option,
            'smoothing': weight}