# Path: DSTK/utils/sampling_helpers.py
# def get_minority_majority_keys(sample_size_dict):
# def upsample_minority_class(data, labels, random_seed=None):
# def downsample_majority_class(data, labels, random_seed=None):
# def random_sample(data, label, sample_fraction, random_seed=None):
# def create_bags(data, label, sample_fraction, num_bags, bagging_fraction, random_seed=None):
# def permute_column_of_numpy_array(array, col_idx, random_seed=None):


from sklearn import datasets as ds
from collections import Counter
from DSTK.utils import sampling_helpers as sh
import numpy as np


cancer_ds = ds.load_breast_cancer()
data = cancer_ds['data'][:, :20]
labels = 2 * cancer_ds['target'] - 1

random_seed = 42


def test_downsample():
    initial_cntr = Counter(labels)
    min_size = np.min(initial_cntr.values())

# Path: DSTK/utils/sampling_helpers.py
# def get_minority_majority_keys(sample_size_dict):
# def upsample_minority_class(data, labels, random_seed=None):
# def downsample_majority_class(data, labels, random_seed=None):
# def random_sample(data, label, sample_fraction, random_seed=None):
# def create_bags(data, label, sample_fraction, num_bags, bagging_fraction, random_seed=None):
# def permute_column_of_numpy_array(array, col_idx, random_seed=None):


# Path: DSTK/tests/tests_utils/test_samplers.py
from sklearn import datasets as ds
from collections import Counter
from DSTK.utils import sampling_helpers as sh
import numpy as np



cancer_ds = ds.load_breast_cancer()
data = cancer_ds['data'][:, :20]
labels = 2 * cancer_ds['target'] - 1

random_seed = 42


def test_downsample():
    initial_cntr = Counter(labels)
    min_size = np.min(initial_cntr.values())

    down_data, down_labels = sh.downsample_majority_class(data, labels, random_seed=random_seed)