ndspflow.workflows.Model

class ndspflow.workflows.Model(model=None, nodes=None)[source]

Model wrapper.

__init__(model=None, nodes=None)[source]

Initialize model.

Methods

__init__([model, nodes])

Initialize model.

fit(model, *args[, axis])

Queue fit.

run_fit(x_array, y_array, *args[, axis])

Execute fit.

fit(model, *args, axis=None, **kwargs)[source]

Queue fit.

Parameters
modelclass

Model class with a .fit method that accepts {(x_array, y_array), y_array}.

args

Passed to the .fit method of the model class.

axisint, optional, default: None

Axis to fit model over.

**kwargs

Passed to the .fit method of the model class.

run_fit(x_array, y_array, *args, axis=None, **kwargs)[source]

Execute fit.

Parameters
y_arrayndarray

Y-axis values. Usually voltage or power.

x_array1d array

X-axis values. Usually time or frequency.

*args

Passed to the .fit method of the model class.

axisint, optional, default: None

Axis to fit model over.

**kwargs

Passed to the .fit method of the model class.

Notes

Pass ‘self’ to any arg or kwarg to infer its value from a instance variable.