time series cross validation in svm
3 次查看(过去 30 天)
显示 更早的评论
HI,
I am trying to write a kernel based regression model (svm or gaussian process) to predict time series data. I note that fitrsvm has cross validation input arguement that random shuffs the set and generate both training and validation sets. BUT, I am working on a time series data that the built in cross validation or kfold methods is not a good choice due to the data sequencial property.
Would be appreciated if anyone can give a tip or two to tackle the task while still using fitrgp or fitrsvm functions...
0 个评论
回答(1 个)
Drew
2023-1-20
In R2022b, the "tspartition" function for time series partition was introduced: https://www.mathworks.com/help/stats/tspartition.html
An example of the use of tspartition is here: https://www.mathworks.com/help/stats/time-series-forecasting-using-ensemble-of-boosted-regression-trees.html . A similar workflow would apply to fitrgp or fitrsvm.
In earlier releases of MATLAB, before tspartition was introduced, you always have the option to create your own partition and then control the partitioning for validation experiments by directly passing datasets to the relevant model-buillding and model-testing functions.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!