CPCLAB-UNIPI / SIPPY

Systems Identification Package for PYthon
GNU Lesser General Public License v3.0
269 stars 92 forks source link

ARMA(X) Model prediction is a bit ambigious #44

Open Ferus-TUB opened 2 years ago

Ferus-TUB commented 2 years ago

Dear Sippy Team,

I'm having in issue regarding the prediction methods for non State Space Models. For me it is not clear how the user is supposed to use the model after its identification. I understand how to identify the models but afterwards I want to use the model for a prediction. The documentation is a bit ambigious regarding this aspect. I don't know which method to use for that. For example is the method fset.validation defined as a 1-step ahead simulation but the equation doesnt say y_hat_k+1.

image

So my understanding would be that this method is only used internally to validate the model after a training step. It is not supposed to be used as a prediction method.

So my question is: How is the user supposed to be simulating the identified system given a new input, as well as with optional old outputs(y(k-1)) ?

RBdC commented 2 years ago

Dear Ferus-TUB, thank your useful comment. You are right, the notation about validation function in the user guide was indeed (very) ambiguous, if not confusing!

We fixed it and uploaded a new version of the guide on the repo. Please note that the validation function is actually for prediction scopes (1- or k-step ahead). If you want to simulate your identified model with only the input, you can use the standard lsim function of control.matlab package.

Best regards SIPPY team

Ferus-TUB commented 2 years ago

Dear Sippy Team, I'm still confused at this point. My understanding of a system identification is that you have 3 basic steps:

  1. System identification by using input-output data + model structure
  2. Verification/Validation using new input output Data to confirm your system
  3. Prediction of the output using input and past predicted outputs

If I follow these basic steps I can see in your documentation that the method system_identification(y, u, 'ARMAX') mets obviously the first step. Now it gets kinda confusing. The method fset.validation seems to be for validating the system by using new input output data and thus fullfills the second step. This seems to be in line with regards to your documentation where it says:

"This function is very useful when the user wants to cross-validate the identified input/output model, that is, test the previously identified model on new data not used in the identification stage"

But in your previous comment you mentioned that this method is intended for prediction scope. So my understanding in that case would be that it is intended for step 3.

Can you further clarrify on this matter?

If the method fset.validation would be used for validation and also for prediction then I would suggest to change up the code and/or the documentaion because the equation 7.1 is then still ambigious, because in the case of prediction wouldn't the system just pass through the y_k and ignore everything else. Because y_k would be the best estimate for yhat_k.

image

Edit: Didn't mean to close it.