How do I perform sequential training using FLANN model for k-fold cross validation in classification task?

I want to compare trigonometric FLANN performance with MLP, SVM, RBF for classification task (Thesis topic). because I want to use sequential training, how will k-fold validation be done ?, right now I am using training and testing set (hold out only) and this method is giving very high accuracy. I am performing following steps : (for FLANN model) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[1] fix learning rate=mu, fix total No. of iterations(epochs)=N_epoch=40, N_avg=statistical average=30 [2] for i=1:N_avg randomly initialize weights=W divide dataset into two mutually exclusive subsets-randomly a)training (70%) b) testing (30%) [3] for j=1:N_epoch [4] for k=1:length(tr_Samples) find model output compute error update weights (sequentially) end (k loop) end (j loop) store tr_accuracy(i)
[5] repeat above procedure for one ts_epoch (1 to No. of testing samples) use final W (updated) to compute output and find ts_accuracy(i)
end (i loop)
find mean of tr_accuracy and mean of ts_accuracy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% now if I want to use validation or cross validation (say 5 fold) then where and how should I change my code?

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Asked:

on 15 Mar 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!