pactools.AddDriverDelay

class pactools.AddDriverDelay(delay=0, n_decay=30)[source]

Transformer which adds a time delay in the driver of a DAR model

Examples

>>> from sklearn.model_selection import GridSearchCV
>>> from sklearn.pipeline import pipeline
>>> from pactools.grid_search import DARSklearn, AddDriverDelay
>>> from pactools.grid_search import MultipleArray
>>> param_grid = {
...     'dar__ordar': [10, 20, 30],
...     'dar__ordriv': [0, 1, 2],
...     'add__delay': [-10, 0, 10]
... }
>>> model = Pipeline(steps=[
...     ('add', AddDriverDelay()),
...     ('dar', DARSklearn(fs=fs, max_ordar=30)),
... ])
>>> X = MultipleArray(sigin, sigdriv, sigdriv_imag)
>>> gscv.fit(X)
>>> print(gscv.cv_results_)
__init__(self, delay=0, n_decay=30)[source]

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

Methods

__init__(self[, delay, n_decay])

Initialize self.

fit(self, X[, y])

No fit is needed

fit_transform(self, X[, y])

Fit to data, then transform it.

get_params(self[, deep])

Get parameters for this estimator.

set_params(self, \*\*params)

Set the parameters of this estimator.

transform(self, X[, y])

Apply the temporal delay on sigdriv and sigdriv_imag

Examples using pactools.AddDriverDelay