PredictNonlinear Transformer#

Examine nonlinearity through the S-Map theta parameter.

Parameter theta is the spatial scale factor of an exponential kernel in the state space (embedding) weighting nearest neighbors. The peak of predictability (rho), if not at theta=0, indicates nonlinear state dependence and an optimal value for theta in SMap predictions.

from pandas import read_csv
from sciedm import PredictNonlinear
from sciedm.datasets import load_dataset

df = load_dataset("SumFlow")
pnl = PredictNonlinear(columns='SumFlow', target='SumFlow', E=4, Tp=3)
pnl.fit_transform(df)

# Plot
from sciedm.aux_func import PlotPredictNonlinear
PlotPredictNonlinear(pnl.theta_rho_,
                     title=f"{pnl.columns} : {pnl.target}  E={pnl.E}  Tp={pnl.Tp}")

Gallery generated by Sphinx-Gallery