public final void crossValidate ( final TrainingParameters params ) { POSTaggerCrossValidator validator = null ; try { validator = getPOSTaggerCrossValidator ( params ) ; validator . evaluate ( this . trainSamples , this . folds ) ; } catch ( final IOException e ) { System . err . println ( "IO error while loading training set!" ) ; e . printStackTrace ( ) ; System . exit ( 1 ) ; } finally { try { this . trainSamples . close ( ) ; } catch ( final IOException e ) { System . err . println ( "IO error with the train samples!" ) ; } } if ( this . detailedListener == null ) { System . out . println ( validator . getWordAccuracy ( ) ) ; } else { // TODO add detailed evaluation here System . out . println ( validator . getWordAccuracy ( ) ) ; } }
Cross validate when no separate testset is available .