MATLAB: Systems of double class cannot be used with the “predict” command.??

idsspredictsvm

hello there… i am new to svm. i got error while using "predict" as….. "Systems of double class cannot be used with the "predict" command. Convert the system to an identified model first, such as by using the "idss" command." i tried "idss" and i am getting error .. "The number of inputs and outputs of the model must match that of the data." What exactly should be done to avoid this issue? kindly help me
Thanks in advance.

Best Answer

You are calling svmtrain to create svmstruct . That structure will be an SVMStruct, described by svmtrain() documentation
You are calling idss() passing in a single parameter, svmstruct . According to http://www.mathworks.com/help/ident/ref/idss.html#inputarg_sys0 when you call idss() with only one parameter, that parameter must be:
"Any dynamic system to convert to an idss model:
  • When sys0 is an identified model, its estimated parameter covariance is lost during conversion. If you want to translate the estimated parameter covariance during the conversion, use translatecov.
  • When sys0 is a numeric (non-identified) model, the state-space data of sys0 define the A, B, C, and D matrices of the converted model. The disturbance matrix K is fixed to zero. The NoiseVariance value defaults to eye(Ny), where Ny is the number of outputs of sys."
The description of Dynamic Models at http://www.mathworks.com/help/ident/ug/dynamic-system-models.html lists routines that can produce identified models. All of those routines start with the two characters 'id'. You do not call any routines that start with 'id' so you are not creating any identified model. The routines that produce numeric models are tf, zpk, ss, frd, pid, pidstd, pid2, and pidstd2. You are not calling any of those. We must conclude that svmstruct is not an appropriate input to use for idss if you are passing only one parameter.
Related Question