MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / OneClassSVM

Class OneClassSVM

python/thundersvm/thundersvm.py:512–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510
511
512class OneClassSVM(SvmModel):
513 _impl = 'one_class'
514
515 def __init__(self, kernel='rbf', degree=3, gamma='auto',
516 coef0=0.0, nu=0.5, tol=0.001,
517 shrinking=False, cache_size=None, verbose=False,
518 max_iter=-1, n_jobs=-1, max_mem_size=-1, random_state=None, gpu_id=0):
519 super(OneClassSVM, self).__init__(
520 kernel=kernel, degree=degree, gamma=gamma,
521 coef0=coef0, C=0., nu=nu, epsilon=0.,
522 tol=tol, probability=False, class_weight=None,
523 shrinking=shrinking, cache_size=cache_size, verbose=verbose,
524 max_iter=max_iter, n_jobs=n_jobs, max_mem_size=max_mem_size, random_state=random_state, gpu_id=gpu_id
525 )
526
527 def fit(self, X, y=None):
528 super(OneClassSVM, self).fit(X, np.ones(_num_samples(X)))
529
530
531class SVR(SvmModel, RegressorMixin):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected