def __init__(self, group_by, func=None, target=None, min_sample=10): # How terrible of a hack is this? super(TargetAggregationByFactor, self).__init__() self.group_by = group_by self.func = func self.target = to_feature(target) self.min_sample = min_sample
def __init__(self, group_by, func=None, target=None, min_sample=10, regularize=True): super(TargetAggregationByFactor, self).__init__() self.group_by = group_by self.func = func self.target = to_feature(target) self.min_sample = min_sample self.regularize = regularize