AutoRegressive Moving Average with eXogenous input (ARMAX)

class softsensor.armax.ARMAX(order: Tuple[int, int, int], delta1: float = 0.03, delta2: float = 0.01, num_iteration: int = 10)[source]

Represents an AutoRegressive Moving Average with eXogenous input model.

Parameters:
  • order (Tuple[int, int, int]) – Parameter for the order of the outputs and inputs in den equation (na, nb, nc)

  • delta1 (float) – Threshold for parameters.

  • delta2 (float) – Threshold for prediction error.

  • num_iteration (int) – Number of iteration for the parameter estimation with the extended least squares algorithm.

Return type:

None.

Example

>>> import pandas as pd
>>> import numpy as np
>>> import softsensor.armax as armax
>>> d = {'in_col': np.random.rand(101),
         'out_col': np.random.rand(101)}
>>> df = pd.DataFrame(d)
>>> armax = armax.ARMAX(order=(4, 4, 4), num_iteration=1)
>>> armax.fit(data_train=[df], input_sensors=['in_col'], output_sensors=['out_col'])
>>> print(len(armax.parameters))
12
fit(data_train: List[DataFrame], input_sensors: List[str], output_sensors: List[str], windows: List[Tuple[int, int]] = None, verbose: bool = False) None[source]

Fit the ARMAX model

Parameters:
  • data_train (list[pd.DataFrame]) – Training data

  • input_sensors (list[str]) – Name of the input sensors.

  • output_sensors (list[str]) – Name of the output sensors.

  • windows (Optional[list[tuple[int, int]]]) – Set the windows for fitting the ARMAX parameters.

  • verbose (bool) – Verbose flag for additional information.

Return type:

None

prediction(data_test: DataFrame, noise: ndarray = None) DataFrame[source]

Predict the outputs to the input data

Parameters:
  • data_test (pd.DataFrame) – Input to the system

  • noise (np.ndarray) – Noise sequence

Returns:

output – Predicted output of the system

Return type:

pd.DataFrame