Created on 13 jan. 2011
Code author: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
This module provides various convenience functions and classes.
save the results to the specified cPickle file. To facilitate transfer across different machines. the files are saved in binary format
see also: http://projects.scipy.org/numpy/ticket/1284
Parameters: |
|
---|---|
Raises : | IOError if file not found |
load the specified cPickle file. the file is assumed to be saves using save_results.
Parameters: | file – the path of the file |
---|---|
Returns: | the unpickled results |
Raises : | IOError if file not found |
This function transform a structured experiments array into a list of case dicts. This can then for example be used as an argument for running perform_experiments().
Parameters: | experiments – a structured array containing experiments |
---|---|
Returns: | a list of case dicts. |
convenience function for merging the return from perform_experiments().
The function merges results2 with results1. For the experiments, it generates an empty array equal to the size of the sum of the experiments. As dtype is uses the dtype from the experiments in results1. The function assumes that the ordering of dtypes and names is identical in both results.
A typical use case for this function is in combination with experiments_to_cases(). Using experiments_to_cases() one extracts the cases from a first set of experiments. One then performs these cases on a different model or policy, and then one wants to merge these new results with the old result for further analysis.
Parameters: |
|
---|---|
Returns: | the merged results |
Base class from which different call back classes can be derived. Callback is responisble for storing the results of the runs.
Method responsible for storing results. The implementation in this class only keeps track of how many runs have been completed and logging this.
Parameters: |
|
---|
default callback system callback can be used in performExperiments as a means for specifying the way in which the results should be handled. If no callback is specified, this default implementation is used. This one can be overwritten or replaced with a callback of your own design. For example if you prefer to store the result in a database or write them to a text file
Method responsible for storing results. This method calls super() first, thus utilizing the logging provided there
Parameters: |
|
---|---|
Returns: | a tuple with the cases structured array and the dict of result arrays. |