Crossvalidation of liinear models?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tania
am 9 Aug. 2014
Kommentiert: Greg Heath
am 2 Sep. 2014
Hi, does anyone knows if there is a function to crossvalidated my linear model? i can only find it for descision trees unfortunately.. Thank you!
0 Kommentare
Akzeptierte Antwort
Greg Heath
am 9 Aug. 2014
help crossval, doc crossval
help cvpartition, doc cvpartition
Hope this helps
Thank you for formally accepting my answer
Greg
2 Kommentare
Weitere Antworten (1)
Ahmet Cecen
am 9 Aug. 2014
Bearbeitet: Ahmet Cecen
am 9 Aug. 2014
This depends on how you would like to do the cross validation. Leave-one-out cross validation has a nice trick for linear models that can be exploited to perform the whole thing in mere seconds. If you would like to leave more out, or use a k-fold validation, you just have to retrain the model each time and calculate the cross-validation error. I am not aware of any native functions in MATLAB that does CV for linear models. My file exchange function MultiPolyRegressV3 has built in leave-one-out cross validation with the trick exploited.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Gaussian Process Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!