protected List<ITEM_TYPE> selectFoldTestItems(List<ITEM_TYPE> items,int nFolds,int fold){
  List<ITEM_TYPE> testItems=new ArrayList<ITEM_TYPE>();
  for (int i=0; i < items.size(); ++i) {
    if (i % nFolds == fold) {
      testItems.add(items.get(i));
    }
  }
  return testItems;
}

protected List < ITEM_TYPE > selectFoldTestItems ( List < ITEM_TYPE > items , int nFolds , int fold ) { List < ITEM_TYPE > testItems = new ArrayList < ITEM_TYPE > ( ) ; for ( int i = 0 ; i < items . size ( ) ; ++ i ) { if ( i % nFolds == fold ) { testItems . add ( items . get ( i ) ) ; } } return testItems ; }
determines which items should be used for testing in one fold of a cross - validation . the default implementation includes every ( nfolds ) th item , but this may be overridden in subclasses .
