hypertools.reduce.autoencoders.SequenceAutoencoder

class hypertools.reduce.autoencoders.SequenceAutoencoder(n_components=2, hidden_dims=None, epochs=100, batch_size=64, lr=0.001, device='auto', random_state=None, verbose=False)[source]

A GRU seq2seq autoencoder reducer for genuine timeseries/trajectory data: the ROWS of x are treated as one time-ordered sequence, and a latent vector is produced PER TIMEPOINT (transform(x) still returns (n_rows, n_components), one row per input row).

Because row order is meaningful, training uses the full sequence every epoch (no row shuffling/minibatching – batch_size is accepted for interface consistency with the other variants but ignored).

Parameters:
n_componentsint

Per-timepoint latent dimensionality (default: 2).

hidden_dimsNone, int, or sequence of int

GRU hidden size. None (default) computes a sensible width geometrically between n_components and the number of input features; only the first value is used if a sequence is given.

epochs, lr, device, random_state, verbose

See Autoencoder.

batch_sizeint

Accepted for interface consistency; ignored (see above).

Attributes:
net_torch.nn.Module or None

The fitted network.

Methods

fit(X[, y])

Fit the autoencoder on X (see fit_transform); returns self.

fit_transform(X[, y])

Standardize X, train a fresh network on it, and return the fitted latent codes.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

inverse_transform(Z)

Decode latent codes Z back to (standardization-undone) feature space.

set_inverse_transform_request(*[, Z])

Configure whether metadata should be requested to be passed to the inverse_transform method.

set_params(**params)

Set the parameters of this estimator.

transform(X)

Apply the already-fitted network to (new) X, without refitting.

__init__(n_components=2, hidden_dims=None, epochs=100, batch_size=64, lr=0.001, device='auto', random_state=None, verbose=False)[source]

Methods

__init__([n_components, hidden_dims, ...])

fit(X[, y])

Fit the autoencoder on X (see fit_transform); returns self.

fit_transform(X[, y])

Standardize X, train a fresh network on it, and return the fitted latent codes.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

inverse_transform(Z)

Decode latent codes Z back to (standardization-undone) feature space.

set_inverse_transform_request(*[, Z])

Configure whether metadata should be requested to be passed to the inverse_transform method.

set_params(**params)

Set the parameters of this estimator.

transform(X)

Apply the already-fitted network to (new) X, without refitting.

Attributes

is_fitted

Whether fit/fit_transform has already been run.