giotto.base.TransformerResamplerMixin

class giotto.base.TransformerResamplerMixin

Mixin class for all transformers-resamplers in giotto-learn.

Methods

fit_transform(self, X[, y])

Fit to data, then transform it.

fit_transform_resample(self, X, y, …)

Fit to data, then transform the input and resample the target.

transform_resample(self, X, y)

Fit to data, then transform it.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

fit_transform(self, X, y=None, **fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
Xndarray of shape (n_samples, …)

Input data.

yNone

There is no need for a target in a transformer, yet the pipeline API requires this parameter.

Returns
Xtnumpy array of shape (n_samples, …)

Transformed input.

fit_transform_resample(self, X, y, **fit_params)

Fit to data, then transform the input and resample the target. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X ans a resampled version of y.

Parameters
Xndarray of shape (n_samples, …)

Input data.

yndarray of shape (n_samples, )

Target data.

Returns
Xtndarray of shape (n_samples, …)

Transformed input.

yrndarray of shape (n_samples, …)

Resampled target.

transform_resample(self, X, y)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
Xndarray of shape (n_samples, …)

Input data.

yndarray of shape (n_samples, )

Target data.

Returns
Xtndarray of shape (n_samples, …)

Transformed input.