AutoRegressive model with eXogenous input (ARX)
- class softsensor.arx.ARX(order: Tuple[int, int])[source]
Represents an AutoRegressive with eXogenous input model.
- Parameters:
order (Tuple[int, int]) – Parameter for the order of the outputs and inputs in den equation (na, nb)#
- Return type:
None.
Example
>>> import pandas as pd >>> import numpy as np >>> import softsensor.arx as arx >>> d = {'in_col': np.linspace(0, 100, 101), 'out_col': np.linspace(100, 0, 101)}
>>> df = pd.DataFrame(d) >>> arx = arx.ARX(order=(2, 2)) >>> arx.fit(data_train=[df], input_sensors=['in_col'], output_sensors=['out_col']) >>> print(len(arx.parameters)) 4
- build_data_matrix(data_train: List[DataFrame], data_type: str) ndarray [source]
Build the output matrix or input matrix with all data points from list of DataFrames.
- 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 ARX model
- prediction(data_test: DataFrame) DataFrame [source]
Predict the outputs to the input data
- Parameters:
data_test (pd.DataFrame) – Input to the system
- Returns:
output – Predicted output of the system
- Return type:
pd.DataFrame