"2. 1 test set is tested using the classifier trained on the remaining 9.\n",
"2. 1 test set is tested using the classifier trained on the remaining 9.\n",
"3. We then do test/train on all of the other sets and average the percentages. \n",
"3. We then do test/train on all of the other sets and average the percentages. \n",
"\n",
"\n",
"To achieve the first step (divide our training set into k disjoint subsets), use the function crossvalind.m (posted in the Utilities)\n",
"To achieve the first step (divide our training set into k disjoint subsets), use the function [Kfold](http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.KFold.html) in the scikit.learn cross_validation package.\n",
"\n",
"\n",
" INDICES = CROSSVALIND('Kfold',N,K) returns randomly generated indices\n",
" K-Folds cross validation iterator.\n",
" for a K-fold cross-validation of N observations. INDICES contains equal\n",
" Provides train/test indices to split data in train test sets. Split dataset into k consecutive folds (without shuffling).\n",
" (or approximately equal) proportions of the integers 1 through K that\n",
"\n",
" define a partition of the N observations into K disjoint subsets.\n",
" You can visit the scikit.learn documentation to look at all the other options. This code is also posted as a template in \n",