Reduce the data size of COCO experiment folder(s) from the default logger.
Data are copied into a new folder and then reduced in place.
Usage on a system shell:
python -m cocopp.reduce_size folder_name
folder_name may be a single experiment folder or may contain several full
experiment folders. In either case, the reduction is applied to all
admissible single data files found anywhere under folder_name.
Further arguments denote the functions applied to the files, by default reduce_dat reduce_tdat remove_x.
Usage in an IPython/Python shell:
import cocopp cocopp.reduce_size.main(folder_name)
A second argument may contain a tuple or list of the functions names
applied to the files, by default ("reduce_dat", "reduce_tdat",
"remove_x").
Under a *nix shell, the result can then be check with du -sh *.
Details: this script removes lines in the data files which are not needed
with cocopp.main. Comment lines starting with # or % are
unchanged. The first and third columns are considered as evaluations
(costs) and f-values (quality indicator to be minimized) respectively.
| Class | |
mininal class to indicate target hits based on file lines. |
| Function | is |
Undocumented |
| Function | is |
Undocumented |
| Function | main |
folder_name contains output of a single COCO experiment, usually a folder in exdata |
| Function | reduce |
return a new list with fewer lines, remove everything after a negative target was hit too |
| Function | reduce |
Undocumented |
| Function | reduce |
return a new list with first and last data lines only. |
| Function | reduce |
Undocumented |
| Function | remove |
change lines in place, keep only first 5 entries of data lines |
| Function | remove |
define on which files to apply remove_x |
| Variable | allowed |
Undocumented |
| Variable | final |
Undocumented |
| Variable | number |
Undocumented |
| Function | _condition |
should transform be applied to filename? |
| Function | _rewrite |
read in file_path, apply transform to its lines, and rewrite it |
return a new list with first and last data lines only.
Evaluations are assumed to be in the first column.