deepmol.imbalanced_learn package
Submodules
deepmol.imbalanced_learn.imbalanced_learn module
- class ClusterCentroids(sampling_strategy: float | str | dict | callable = 'auto', random_state: int | RandomState | None = 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:
ABCClass 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: float | str | dict | callable = 'auto', random_state: int | RandomState | None = 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: float | str | dict | callable = 'auto', random_state: int | RandomState | None = 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: float | str | dict | callable = 'auto', random_state: int | RandomState | None = None, k_neighbors: int = 5, n_jobs: int | None = 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: float | str | dict | callable = 'auto', random_state: int | RandomState | None = None, smote: callable | None = None, enn: callable | None = None, n_jobs: int | None = 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: float | str | dict | callable = 'auto', random_state: int | RandomState | None = None, smote: callable | None = None, tomek: callable | None = None, n_jobs: int | None = 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.