deepmol.imbalanced_learn package
Submodules
deepmol.imbalanced_learn.imbalanced_learn module
- class ClusterCentroids(sampling_strategy: Union[float, str, dict, callable] = 'auto', random_state: Optional[Union[int, RandomState]] = None, estimator: callable = KMeans(), voting: str = 'auto')[source]
Bases:
ImbalancedLearnClass to perform ClusterCentroids under-sampling.
Wrapper around ImbalancedLearn ClusterCentroids (https://imbalanced-learn.org/stable/generated/imblearn.under_sampling.ClusterCentroids.html)
Perform under-sampling by generating centroids based on clustering.
- class ImbalancedLearn[source]
Bases:
objectClass for dealing with imbalanced datasets.
A ImbalancedLearn sampler receives a Dataset object and performs over/under sampling.
Subclasses need to implement a _sample method to perform over/under sampling.
- class RandomOverSampler(sampling_strategy: Union[float, str, dict, callable] = 'auto', random_state: Optional[Union[int, RandomState]] = None)[source]
Bases:
ImbalancedLearnClass to perform naive random over-sampling.
Wrapper around ImbalancedLearn RandomOverSampler (https://imbalanced-learn.readthedocs.io/en/stable/generated/imblearn.over_sampling.RandomOverSampler.html)
Object to over-sample the minority class(es) by picking samples at random with replacement.
- class RandomUnderSampler(sampling_strategy: Union[float, str, dict, callable] = 'auto', random_state: Optional[Union[int, RandomState]] = None, replacement: bool = False)[source]
Bases:
ImbalancedLearnClass to perform RandomUnderSampler under-sampling.
Wrapper around ImbalancedLearn RandomUnderSampler (https://imbalanced-learn.org/stable/generated/imblearn.under_sampling.RandomUnderSampler.html)
Under-sample the majority class(es) by randomly picking samples with or without replacement.
- class SMOTE(sampling_strategy: Union[float, str, dict, callable] = 'auto', random_state: Optional[Union[int, RandomState]] = None, k_neighbors: int = 5, n_jobs: Optional[int] = None)[source]
Bases:
ImbalancedLearnClass to perform Synthetic Minority Oversampling Technique (SMOTE) over-sampling.
Wrapper around ImbalancedLearn SMOTE (https://imbalanced-learn.org/stable/generated/imblearn.over_sampling.SMOTE.html)
- class SMOTEENN(sampling_strategy: Union[float, str, dict, callable] = 'auto', random_state: Optional[Union[int, RandomState]] = None, smote: Optional[callable] = None, enn: Optional[callable] = None, n_jobs: Optional[int] = None)[source]
Bases:
ImbalancedLearnClass to perform SMOTEENN over and under-sampling.
Wrapper around ImbalancedLearn SMOTEENN (https://imbalanced-learn.org/stable/generated/imblearn.combine.SMOTEENN.html)
Over-sampling using SMOTE and cleaning using ENN. Combine over and under-sampling using SMOTE and Edited Nearest Neighbours.
- class SMOTETomek(sampling_strategy: Union[float, str, dict, callable] = 'auto', random_state: Optional[Union[int, RandomState]] = None, smote: Optional[callable] = None, tomek: Optional[callable] = None, n_jobs: Optional[int] = None)[source]
Bases:
ImbalancedLearnClass to perform SMOTETomek over and under-sampling.
Wrapper around ImbalancedLearn SMOTETomek (https://imbalanced-learn.org/stable/generated/imblearn.combine.SMOTETomek.html)
Over-sampling using SMOTE and cleaning using Tomek links. Combine over- and under-sampling using SMOTE and Tomek links.