How do I need to change kfoldPredict if I use it instead of predict?

1 visualización (últimos 30 días)
I recently included a k-fold cross-validation in my SVM regression model (Leave-One-Out Cross-Validation, to be precise). For training the model I use fitrsvm with the 'Leaveout' option.
Before including the cross-validation I was able to predict the y-values using predict(MyModel,X), with X being the matrix of my predictor variables.
However, as far as I know, I now have to use kfoldPredict instead of predict because the resulting model is now a cross-validated model. The problem is that I can't figure out how I can tell the kfoldPredict function which matrix of values it should use for prediction (the Matrix X), because kfoldPredict(MyModel,X) seems not to be a valid specification for the function. As I first want to predict the in-sample MSE and then the out-of-sample MSE for my model, this would be necessary for me to do so.
Can anybody tell me how to specify this function in the way I want?
Thanks in advance for your help.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by