Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.

nidl.estimators.dummy.DummyEmbeddingEstimator

class nidl.estimators.dummy.DummyEmbeddingEstimator(strategy='normal', n_features=10, random_state=None, constant=None, **kwargs)[source]

Bases: TransformerMixin, BaseEstimator

A dummy embedding estimator returning an embedding independent of the input data.

Parameters:
strategy: str, default=”normal”

The strategy to generate the dummy embedding with shape (n_samples, n_features). It can be one of the following:

  • “identity”: the embedding is the same as the input batch (flattened).

  • “normal”: the embedding is generated from a normal distribution.

  • “uniform”: the embedding is generated from a uniform distribution.

  • “constant”: the embedding is a constant value.

n_features: int, default=10

The number of features in the embedding.

constant: float, default=0.0

The constant value to use when strategy is “constant”.

random_state: int, RandomState instance or None, default=None

Controls the randomness of the embedding generation when strategy is “normal” or “uniform”.

__init__(strategy='normal', n_features=10, random_state=None, constant=None, **kwargs)[source]
configure_optimizers()[source]

No optimizers needed for this dummy estimator.

test_step(*args, **kwargs)[source]

No testing needed for this dummy estimator.

training_step(*args, **kwargs)[source]

No training needed for this dummy estimator.

transform_step(batch, batch_idx, dataloader_idx=0)[source]

Generates a dummy embedding with the same length as the input batch.