Skip to main content
Ctrl+K

fastcan 0.6.0.dev0 documentation

  • fastcan
  • narx
  • utils
  • User Guide
  • Examples
  • fastcan
  • narx
  • utils
  • User Guide
  • Examples

Section Navigation

  • NARX
  • fd2tp
  • gen_poly_features
  • gen_time_shift_features
  • make_narx
  • make_poly_features
  • make_poly_ids
  • make_time_shift_features
  • make_time_shift_ids
  • print_narx
  • tp2fd
  • narx
  • print_narx

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  |

previous

make_time_shift_ids

next

tp2fd

On this page
  • print_narx()
Show Source

© Copyright 2024 - 2026, fastcan developers (MIT License).

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.18.0.