Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, method='direct', eta=0.01, epochs=50,
minibatches=None, random_seed=None,
print_progress=0):
_BaseModel.__init__(self)
_IterativeModel.__init__(self)
_Regressor.__init__(self)
self.eta = eta
self.epochs = epochs
self.minibatches = minibatches
self.random_seed = random_seed
self.print_progress = print_progress
self._is_fitted = False
self.method = method
if method != 'sgd' and minibatches is not None:
raise ValueError(('Minibatches should be set to `None` '
'if `method` != `sgd`. Got method=`%s`.')
% (method))
supported_methods = ('sgd', 'direct', 'svd', 'qr')
if method not in supported_methods:
def __init__(self, eta=0.1, epochs=50, random_seed=None,
print_progress=0):
_BaseModel.__init__(self)
_IterativeModel.__init__(self)
_Classifier.__init__(self)
self.eta = eta
self.epochs = epochs
self.random_seed = random_seed
self.print_progress = print_progress
self._is_fitted = False
def __init__(self, eta=0.01, epochs=50,
l2=0.0,
minibatches=1,
n_classes=None,
random_seed=None,
print_progress=0):
_BaseModel.__init__(self)
_IterativeModel.__init__(self)
_Classifier.__init__(self)
_MultiClass.__init__(self)
self.eta = eta
self.epochs = epochs
self.l2 = l2
self.minibatches = minibatches
self.n_classes = n_classes
self.random_seed = random_seed
self.print_progress = print_progress
self._is_fitted = False
def __init__(self, eta=0.5, epochs=50,
hidden_layers=[50],
n_classes=None,
momentum=0.0, l1=0.0, l2=0.0,
dropout=1.0,
decrease_const=0.0,
minibatches=1, random_seed=None,
print_progress=0):
_BaseModel.__init__(self)
_Classifier.__init__(self)
_IterativeModel.__init__(self)
_MultiClass.__init__(self)
_MultiLayer.__init__(self)
if len(hidden_layers) > 1:
raise AttributeError('Currently, only 1 hidden layer is supported')
self.hidden_layers = hidden_layers
self.eta = eta
self.n_classes = n_classes
self.l1 = l1
self.l2 = l2
self.decrease_const = decrease_const
self.momentum = momentum
self.epochs = epochs
self.minibatches = minibatches
self.random_seed = random_seed
self.print_progress = print_progress
def __init__(self, eta=0.01, epochs=50,
l2_lambda=0.0, minibatches=1,
random_seed=None,
print_progress=0):
_BaseModel.__init__(self)
_IterativeModel.__init__(self)
_Classifier.__init__(self)
self.eta = eta
self.epochs = epochs
self.l2_lambda = l2_lambda
self.minibatches = minibatches
self.random_seed = random_seed
self.print_progress = print_progress
self._is_fitted = False
def __init__(self, k, max_iter=10,
convergence_tolerance=1e-05,
random_seed=None, print_progress=0):
_BaseModel.__init__(self)
_Cluster.__init__(self)
_IterativeModel.__init__(self)
self.k = k
self.max_iter = max_iter
self.convergence_tolerance = convergence_tolerance
self.random_seed = random_seed
self.print_progress = print_progress
self._is_fitted = False