<commit_before>from sklearn.metrics.pairwise import rbf_kernel
from sklearn.svm import OneClassSVM
from sklearn.utils.validation import check_is_fitted

from .base import BaseOutlierDetector


class OCSVM(BaseOutlierDetector):
    """One Class Support Vector Machines (only RBF kernel).

    Parameters
    ----------
    cache_size : float, default 200
        Specify the size of the kernel cache (in MB).

    gamma : float, default 'auto'
        Kernel coefficient. If gamma is 'auto', 1 / n_features will be used
        instead.

    max_iter : int, optional default -1
        Maximum number of iterations.

    nu : float, default 0.5
        An upper bound on the fraction of training errors and a lower bound of
        the fraction of support vectors. Should be in the interval (0, 1].

    random_state : int or RandomState instance, default None
        Seed of the pseudo random number generator.

    shrinking : bool, default True<commit_msg>add __all__ variable<commit_after>from sklearn.metrics.pairwise import rbf_kernel
from sklearn.svm import OneClassSVM
from sklearn.utils.validation import check_is_fitted

from .base import BaseOutlierDetector

__all__ = ['OCSVM']


class OCSVM(BaseOutlierDetector):
    """One Class Support Vector Machines (only RBF kernel).

    Parameters
    ----------
    cache_size : float, default 200
        Specify the size of the kernel cache (in MB).

    gamma : float, default 'auto'
        Kernel coefficient. If gamma is 'auto', 1 / n_features will be used
        instead.

    max_iter : int, optional default -1
        Maximum number of iterations.

    nu : float, default 0.5
        An upper bound on the fraction of training errors and a lower bound of
        the fraction of support vectors. Should be in the interval (0, 1].

    random_state : int or RandomState instance, default None
        Seed of the pseudo random number generator.

    shrinking : bool, default True
{'fraction_non_alphanumeric': 0.06423432682425488, 'fraction_numerical': 0.009249743062692703, 'mean_word_length': 2.8707753479125246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4619628', 'n_tokens_mistral': 550, 'n_tokens_neox': 509, 'n_words': 229}