twodlearn.datasets.unbalanced module

class twodlearn.datasets.unbalanced.DfUnbalancedDataset(datasets)[source]

Bases: twodlearn.datasets.unbalanced.UnbalancedDataset

columns[source]
dtypes[source]
filter_by_size(minimum_size)[source]
get_stats()[source]
mapper[source]

Decorator used to specify an optional property inside a model. The decorator works similar to @property, but the specified method correponds to the initialization of the property

maps[source]

Decorator used to specify an optional property inside a model. The decorator works similar to @property, but the specified method correponds to the initialization of the property

sample(n_samples, replace=False)[source]
class twodlearn.datasets.unbalanced.UnbalancedDataset(datasets)[source]

Bases: object

property datasets[source]
filter_by_size(minimum_size)[source]
classmethod from_data(data_x, data_y, DatasetClass=<class 'twodlearn.datasets.base.Dataset'>)[source]
get_stats()[source]
property histogram[source]
property labels[source]
mapper[source]

Decorator used to specify an optional property inside a model. The decorator works similar to @property, but the specified method correponds to the initialization of the property

n_samples[source]
next_batch(batch_size)[source]
normalizer[source]

Decorator used to specify an optional property inside a model. The decorator works similar to @property, but the specified method correponds to the initialization of the property

sample(n_samples, replace=False)[source]
shuffle()[source]
split(values, shuffle=True)[source]

Split the dataset according to the percentages provided in values

Parameters
  • values (list) – percentages used for splitting the dataset

  • shuffle (bool) – true if shuffle the dataset before splitting (default True)

Returns

list with the new datasets

Return type

list(UnbalancedDataset)