diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-12-01 14:25:51 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-12-01 14:25:51 +0100 |
commit | dfa508d0bddabd3e64ad86693b2c25537613bed8 (patch) | |
tree | 79c8a859e7d98c699627112b9a5f3f13dcf218c2 /lib/cli.py | |
parent | 7e07dfbe880e380b95586ce9eb32bf80f14736c1 (diff) |
move some standard arguments to cli helper class
Diffstat (limited to 'lib/cli.py')
-rw-r--r-- | lib/cli.py | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -1,10 +1,6 @@ #!/usr/bin/env python3 -from dfatool.functions import ( - SplitFunction, - AnalyticFunction, - StaticFunction, -) +from dfatool.functions import SplitFunction, AnalyticFunction, StaticFunction def print_static(model, static_model, name, attribute): @@ -98,3 +94,24 @@ def model_quality_table(header, result_lists, info_list): else: buf += "{:7}----{:8}".format("", "") print(buf) + + +def add_standard_arguments(parser): + parser.add_argument( + "--export-dref", + metavar="FILE", + type=str, + help="Export model and model quality to LaTeX dataref file", + ) + parser.add_argument( + "--cross-validate", + metavar="<method>:<count>", + type=str, + help="Perform cross validation when computing model quality. " + "Only works with --show-quality=table at the moment.", + ) + parser.add_argument( + "--parameter-aware-cross-validation", + action="store_true", + help="Perform parameter-aware cross-validation: ensure that parameter values (and not just observations) are mutually exclusive between training and validation sets.", + ) |