Adaptive one-step AR prediction =============================== .. admonition:: Tutorial goal Use a stable adaptive recursive model for one-step signal prediction. .. note:: New to the terminology? See the :doc:`lattice DSP concept map <../../algorithms/concept_map>` and the :doc:`causality/data-use guide <../../theory/causality_and_data_use>` for how online, offline, block, and MIMO examples should be read. Context ------- AR prediction is the scalar setting where lattice filters are historically very natural. The model predicts the current sample from past samples while preserving a stable recursive parameterization. Key idea and equations ---------------------- A one-step predictor estimates .. math:: \hat{x}[n] = g(x[n-1], x[n-2], \ldots),\qquad e[n]=x[n]-\hat{x}[n]. How to read the result ---------------------- The final prediction error should be smaller than the initial error after the predictor adapts. Run command ----------- .. code-block:: bash python examples/adaptive_prediction_ar.py Source code ----------- .. literalinclude:: ../../../examples/adaptive_prediction_ar.py :language: python :linenos: