Пример #1
0
    def __init__(
        self,
        operator=None,
        sampling_strategy="auto",
        random_state=None,
        k_neighbors=5,
        n_jobs=1,
        m_neighbors=10,
        kind="borderline-1",
    ):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            "sampling_strategy": sampling_strategy,
            "random_state": random_state,
            "k_neighbors": k_neighbors,
            "n_jobs": n_jobs,
            "m_neighbors": m_neighbors,
            "kind": kind,
        }

        resampler_instance = OrigModel(**self._hyperparams)
        super(BorderlineSMOTEImpl, self).__init__(operator=operator,
                                                  resampler=resampler_instance)
Пример #2
0
    def __init__(
        self,
        operator=None,
        sampling_strategy="auto",
        random_state=None,
        k_neighbors=5,
        n_jobs=1,
        m_neighbors=10,
        svm_estimator=None,
        out_step=0.5,
    ):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            "sampling_strategy": sampling_strategy,
            "random_state": random_state,
            "k_neighbors": k_neighbors,
            "n_jobs": n_jobs,
            "m_neighbors": m_neighbors,
            "svm_estimator": svm_estimator,
            "out_step": out_step,
        }

        resampler_instance = OrigModel(**self._hyperparams)
        super(SVMSMOTEImpl, self).__init__(
            operator=operator, resampler=resampler_instance
        )
Пример #3
0
    def __init__(self,
                 operator=None,
                 sampling_strategy='auto',
                 random_state=None,
                 k_neighbors=5,
                 n_jobs=1,
                 m_neighbors=10,
                 svm_estimator=None,
                 out_step=0.5):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            'sampling_strategy': sampling_strategy,
            'random_state': random_state,
            'k_neighbors': k_neighbors,
            'n_jobs': n_jobs,
            'm_neighbors': m_neighbors,
            'svm_estimator': svm_estimator,
            'out_step': out_step
        }

        resampler_instance = OrigModel(**self._hyperparams)
        super(SVMSMOTEImpl, self).__init__(operator=operator,
                                           resampler=resampler_instance)
Пример #4
0
    def __init__(self, operator = None, sampling_strategy='auto', random_state=None, n_neighbors=5, n_jobs=1):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            'sampling_strategy': sampling_strategy,
            'random_state': random_state,
            'n_neighbors': n_neighbors,
            'n_jobs': n_jobs}
    
        resampler_instance = OrigModel(**self._hyperparams)
        super(ADASYNImpl, self).__init__(
            operator = operator,
            resampler = resampler_instance)
Пример #5
0
    def __init__(self,
                 operator=None,
                 sampling_strategy='auto',
                 random_state=None):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            'sampling_strategy': sampling_strategy,
            'random_state': random_state
        }

        resampler_instance = OrigModel(**self._hyperparams)
        super(RandomOverSamplerImpl,
              self).__init__(operator=operator, resampler=resampler_instance)
Пример #6
0
Файл: adasyn.py Проект: IBM/lale
    def __init__(
        self,
        operator=None,
        sampling_strategy="auto",
        random_state=None,
        n_neighbors=5,
        n_jobs=1,
    ):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            "sampling_strategy": sampling_strategy,
            "random_state": random_state,
            "n_neighbors": n_neighbors,
            "n_jobs": n_jobs,
        }

        resampler_instance = OrigModel(**self._hyperparams)
        super(_ADASYNImpl, self).__init__(operator=operator,
                                          resampler=resampler_instance)
Пример #7
0
    def __init__(self,
                 operator=None,
                 sampling_strategy='auto',
                 random_state=None,
                 k_neighbors=5,
                 n_jobs=1,
                 m_neighbors=10,
                 kind='borderline-1'):
        if operator is None:
            raise ValueError("Operator is a required argument.")

        self._hyperparams = {
            'sampling_strategy': sampling_strategy,
            'random_state': random_state,
            'k_neighbors': k_neighbors,
            'n_jobs': n_jobs,
            'm_neighbors': m_neighbors,
            'kind': kind
        }

        resampler_instance = OrigModel(**self._hyperparams)
        super(BorderlineSMOTEImpl, self).__init__(operator=operator,
                                                  resampler=resampler_instance)