def __init__(self, *args, **kwargs): super(DTMatcher, self).__init__() # If the name is given, then pop it name = kwargs.pop('name', None) if name is None: # If the name of the matcher is give, then create one. # Currently, we use a constant string + a random number. self.name = 'DecisionTree' + '_' + get_ts() else: # Set the name of the matcher, with the given name. self.name = name # Set the classifier to the scikit-learn classifier. self.clf = DecisionTreeClassifier(*args, **kwargs)
def __init__(self, *args, **kwargs): super(LinRegMatcher, self).__init__() # If the name is given, then pop it name = kwargs.pop('name', None) if name is None: # If the name is not given, then create one. # Currently, we use a constant string + a random number. self.name = 'LinearRegression' + '_' + get_ts() else: # set the name for the matcher. self.name = name # Wrap the class implementing linear regression classifer. self.clf = LinRegClassifierSKLearn(*args, **kwargs)