6 # Don't edit the line below, it must look exactly like this.
7 # Everything above this line will be replaced #
18 my $cmd_line = $0 . " " . join( " ", @ARGV );
20 ## Configure the command line parsing
21 Getopt::Long::config("auto_abbrev");
23 ## Declare the options
26 my %required_options = ( "fractions:i"=>'' );
27 my %optional_options = ( );
29 my $res = GetOptions( \%options,
30 @common_options::get_opt_strings,
31 keys(%required_options),
32 keys(%optional_options) );
36 debug -> level( $options{'debug'} );
37 debug -> package( $options{'debug_package'} );
38 debug -> subroutine( $options{'debug_subroutine'} );
39 debug -> warn_with_trace( $options{'warn_with_trace'} );
41 my $eval_string = common_options::model_parameters(\%options);
43 my $model = model -> new ( eval( $eval_string ),
45 debug => $options{'debug'},
46 ignore_missing_output_files => 1 );
48 my $xv = tool::xv_step -> new( nr_validation_groups => $options{'fractions'},
50 subtool_arguments => { modelfit => { eval( $common_options::parameters ) } },
51 post_analyze => \&harvest_ofv,
58 my $xv_object = shift;
60 open XV_REPORT, '>', "xv_result.txt";
61 print XV_REPORT "Prediction model OFV's\tEstimation model OFV's\n";
62 for( my $i = 0; $i <= $#{$xv_object -> prediction_models}; $i++ ){
63 print XV_REPORT $xv_object -> prediction_models -> [$i] -> outputs -> [0] -> ofv -> [0][0], "\t";
64 print XV_REPORT $xv_object -> estimation_models -> [$i] -> outputs -> [0] -> ofv -> [0][0], "\n";