How sequentialfs select XTRAIN and XTEST for calling fun to perform for 10-fold cross-validation?
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
I want to select features using sequentialfs where I used 10 for cross-validation for cvpartition. I have given the Data which is my training data (observation with feature values) and Labels which are the class labels for each observation. My code looks like the following:
Data=read from the excel file;
Labels=read from the excel file;
c=cvpartition(Labels,'KFold',10);
classf=@(Train_data, Train_labels, Test_data, Test_labels)...
sum(predict(fitcsvm(Train_data, Train_labels, 'KernenFunction', 'rbf'), Test_data) ~= Test_labels);
No_features=20;
[fs, history]=sequentialfs(classf,Data,Labels,'cv',c,'nfeatures',No_features,'direction', 'forward', 'options',opts)
But, I could not understand how the sequentialfs select the  Train_data subset and Test_data subset for each fold. 
It is possilbe to custom select the training and test subset for each fold. 
Thanks. 
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
