Prediction based on ClassificationPartitionedModel
Hi all,
I have a predictor matrix X and binary response y (1000 observations) and want to use support vector machine (or other machine learning techniques built in Matlab, i.e., fitctree, fitcdiscr, fitcknn, fitcnet) to train the classifier based on 10-fold cross-validation.
My idea is to use 1-999 observations for cross-validation training and testing, and use the best classifier to predict a single out-of-sample y based on 1000th X. How can I do that?
Without cross-validation, I can simply use predict(.) function in Matlab to predict a single y based on 1000th X. However, this is not allowed when cross-validation is used. For a ClassificationPartitionedModel, the function kfoldPredict(.) should be used. The problem is, I am not allowed to specify the X when using kfoldPredict.
Is there anyone know the answer?
Many thanks.Hi all,
I have a predictor matrix X and binary response y (1000 observations) and want to use support vector machine (or other machine learning techniques built in Matlab, i.e., fitctree, fitcdiscr, fitcknn, fitcnet) to train the classifier based on 10-fold cross-validation.
My idea is to use 1-999 observations for cross-validation training and testing, and use the best classifier to predict a single out-of-sample y based on 1000th X. How can I do that?
Without cross-validation, I can simply use predict(.) function in Matlab to predict a single y based on 1000th X. However, this is not allowed when cross-validation is used. For a ClassificationPartitionedModel, the function kfoldPredict(.) should be used. The problem is, I am not allowed to specify the X when using kfoldPredict.
Is there anyone know the answer?
Many thanks. Hi all,
I have a predictor matrix X and binary response y (1000 observations) and want to use support vector machine (or other machine learning techniques built in Matlab, i.e., fitctree, fitcdiscr, fitcknn, fitcnet) to train the classifier based on 10-fold cross-validation.
My idea is to use 1-999 observations for cross-validation training and testing, and use the best classifier to predict a single out-of-sample y based on 1000th X. How can I do that?
Without cross-validation, I can simply use predict(.) function in Matlab to predict a single y based on 1000th X. However, this is not allowed when cross-validation is used. For a ClassificationPartitionedModel, the function kfoldPredict(.) should be used. The problem is, I am not allowed to specify the X when using kfoldPredict.
Is there anyone know the answer?
Many thanks. machine learning, time series, prediction MATLAB Answers — New Questions