Package pyVerif :: Module Experiment :: Class Experiment
[show private | hide private]
[frames | no frames]

Class Experiment


The base class to derive for constructing new Experiment classes.
Method Summary
  __init__(self, features_dir, bin_dir, norm_file, tmp_dir, out_dir, features_ext, log_on_screen, log_file, executor)
The Experiment object constructor.
  build_clients_scores(self, for_dev)
Compute the clients scores for all the models.
  load_protocols(self, base_dir, variant)
Load both dev and test protocols.
  log(self, txt)
Log the given text.
  log_options(self, options, text)
Log the given options.
  merge_score(self, out_file, for_dev)
Merge the computed into a result file.
  set_cmds(self, train_cmd, train_opts, test_cmd, test_opts)
Set the commands for training and testing the clients models.
  set_dirs(self, models_dir, scores_dir)
Set directories where to put scores and models.
  train_clients_models(self, for_dev)
Train all the clients models.

Method Details

__init__(self, features_dir, bin_dir, norm_file=None, tmp_dir='tmp', out_dir='./', features_ext='.mat', log_on_screen=False, log_file=None, executor=None)
(Constructor)

The Experiment object constructor.

Parameters:
  • features_dir: (string) directory containing the features data
  • bin_dir: (string) directory containing the Torch executable
  • norm_file: (string) file containing the world model file list (default None)
  • tmp_dir: (string) name of the temporary directory (default "tmp")
  • out_dir: (string) output directory to put models, scores, results (default "./")
  • features_ext: (string) features files extension (default ".mat")
  • log_on_screen: (boolean) put the log message on stdout/stdin (default False)
  • log_file: (string) file to put the log messages (default None)
  • executor: (pyVerif.Executor) instance: object to run external command (default None)

build_clients_scores(self, for_dev)

Compute the clients scores for all the models.

Specify for_dev=True if you want to compute for dev set, and for_dev=False if you want to compute for test set.

Parameters:
  • for_dev: (boolean) select if you want to work on the development set or on the test set

load_protocols(self, base_dir, variant)

Load both dev and test protocols.

Load both protocols dev and test from the given directory and the wanted variant.

Parameters:
  • base_dir: (string) directory containing the protocol files
  • variant: (string) variant of the protocol, for example, fem, nist, P, ...

log(self, txt)

Log the given text.

log_options(self, options, text=None)

Log the given options.

Parameters:
  • options: the options to log, of type Values, as returned by OptionParser.parse_args()
  • text: optional text which will be printed before the options

merge_score(self, out_file, for_dev)

Merge the computed into a result file.

Merge the score for either dev or test, putting the result in out_file.

This method should be overwritted in the new classes, as it does nothing by default.

Parameters:
  • for_dev: (boolean) select if you want to work on the development set or on the test set

set_cmds(self, train_cmd, train_opts, test_cmd, test_opts)

Set the commands for training and testing the clients models.

Parameters:
  • train_cmd: (string) command for trainning the models
  • train_opts: (string) command line options for trainning the models
  • test_cmd: (string) command for computing scores
  • test_opts: (string) command line options for computing scores

set_dirs(self, models_dir, scores_dir)

Set directories where to put scores and models.

train_clients_models(self, for_dev)

Train all the clients models.

This method should be overwritted in the new classes, as it does nothing by default.

Parameters:
  • for_dev: (boolean) select if you want to work on the development set or on the test set

Generated by Epydoc 2.1 on Fri Oct 6 12:25:10 2006 http://epydoc.sf.net