print_narx#
- fastcan.narx.print_narx(narx, term_space=20, coef_space=10, float_precision=3)#
Print a NARX model as a Table which contains y idx, Term, and Coef. y idx is used to indicate which output (assuming it is a multi-output case) the term belongs to.
- Parameters:
narx (NARX model) – The NARX model to be printed.
term_space (int, default=20) – The space for the column of Term.
coef_space (int, default=10) – The space for the column of Coef.
float_precision (int, default=3) – The number of places after the decimal for Coef.
- Returns:
table – The table of output index, terms, and coefficients of the NARX model.
- Return type:
str
Examples
>>> from sklearn.datasets import load_diabetes >>> from fastcan.narx import print_narx, NARX >>> X, y = load_diabetes(return_X_y=True) >>> print_narx(NARX().fit(X, y), term_space=10, coef_space=5, float_precision=0) | yid | Term |Coef | |-----|----------|-----| | 0 |Intercept | 152 | | 0 | X[k,0] | -10 | | 0 | X[k,1] |-240 | | 0 | X[k,2] | 520 | | 0 | X[k,3] | 324 | | 0 | X[k,4] |-792 | | 0 | X[k,5] | 477 | | 0 | X[k,6] | 101 | | 0 | X[k,7] | 177 | | 0 | X[k,8] | 751 | | 0 | X[k,9] | 68 |