skbio.table.Augmentation#

class skbio.table.Augmentation(table, label=None, num_classes=None, tree=None)[source]#

Data Augmentation of a omic data table, for predictive models on omic data.

The Augmentation class is mainly designed to enhance the performance of classification models on omic data.

Parameters:
tableskbio.table.Table

The table to augment.

labelnumpy.ndarray, optional

The label of the table. The label is expected to has a shape of (n_samples,) or (n_samples, n_classes). Can be none if the label is not needed.

num_classesint, optional

The number of classes in the label. If None, either the no label is provided, or the label already one-hot encoded.

treeskbio.tree.TreeNode, optional

The tree to use to augment the table. Only required for method phylomix.

Methods

aitchison_mixup(n_samples[, alpha, seed])

Data Augmentation by Aitchison mixup.

compositional_cutmix(n_samples[, seed])

Data Augmentation by compositional cutmix.

mixup(n_samples[, alpha, seed])

Data Augmentation by vanilla mixup.

phylomix(tip_to_obs_mapping, n_samples[, ...])

Data Augmentation by phylomix.

Special methods

__str__()

Return str(self).

Special methods (inherited)

__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__getstate__(/)

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__(/)

Return hash(self).

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

Details

__str__()[source]#

Return str(self).