필터 지우기
필터 지우기

"polyest" gives a different MSE of the found model than "compare" and "sim"

조회 수: 1 (최근 30일)
Calvin Verstegen
Calvin Verstegen 2022년 5월 10일
답변: Vatsal 2024년 2월 2일
I've used polyest to estimate a model for time series data. When finished, it gives a report where it is stated that:
Fit to estimation data: 64.13% (prediction focus)
FPE: 0.1117, MSE: 0.111
However, when I then simulate this model (using sim) with the same time series data, the Mean Squared error is 0.8032. When using the function compare, the error is a little bit smaller but still much bigger than 0.111.
Does polyest use a different way of simulating data or calculating the error? As far as I can tell, it uses the full time-series data.

답변 (1개)

Vatsal
Vatsal 2024년 2월 2일
Hi,
The Mean Squared Error (MSE) reported by the "polyest" function is based on the fit of the model to the estimation data. This error is calculated based on the differences between the observed outputs and the outputs predicted by the model for the same inputs.
When you simulate the model using the "sim" function with the same time series data, the MSE might differ. This is because the simulation performs a forward-prediction, where each output is predicted using both past inputs and previously predicted outputs, rather than the actual observed outputs. As a result, any error in predicting an output at a certain time step can affect the prediction at subsequent time steps, potentially leading to an increased MSE.
Conversely, the "compare" function in MATLAB computes the one-step-ahead prediction error, where each output is predicted using both past inputs and the actual observed outputs from previous time steps. Since this approach does not allow errors to accumulate over time, it often results in a smaller MSE compared to the simulation.
It is also important to note that the MSE can be affected by the choice of initial conditions for the simulation or prediction process.

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by