Crossvalidation of liinear models?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Greg Heath
2014년 8월 9일
help crossval, doc crossval
help cvpartition, doc cvpartition
Hope this helps
Thank you for formally accepting my answer
Greg
댓글 수: 2
추가 답변 (1개)
Ahmet Cecen
2014년 8월 9일
편집: Ahmet Cecen
2014년 8월 9일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!