Click Based CLI¶
The command line interface provides a way to execute a handful of common tasks without touching any Python code. The CLI is implemented using click.
tdub¶
Top Level CLI function.
tdub [OPTIONS] COMMAND [ARGS]...
apply¶
Tasks to apply machine learning models to data.
tdub apply [OPTIONS] COMMAND [ARGS]...
all¶
Generate BDT response arrays for all ROOT files in DATADIR.
tdub apply all [OPTIONS] DATADIR ARRNAME OUTDIR WORKSPACE
Options
- -f, --fold-results <fold_results>¶
fold output directories
- -s, --single-results <single_results>¶
single result dirs
- --and-submit¶
submit the condor jobs
Arguments
- DATADIR¶
Required argument
- ARRNAME¶
Required argument
- OUTDIR¶
Required argument
- WORKSPACE¶
Required argument
single¶
Generate BDT response array for INFILE and save to .npy file.
We generate the .npy files using either single training results (-s flag) or folded training results (-f flag).
tdub apply single [OPTIONS] INFILE ARRNAME OUTDIR
Options
- -f, --fold-results <fold_results>¶
fold output directories
- -s, --single-results <single_results>¶
single result dirs
Arguments
- INFILE¶
Required argument
- ARRNAME¶
Required argument
- OUTDIR¶
Required argument
misc¶
Tasks under a miscellaneous umbrella.
tdub misc [OPTIONS] COMMAND [ARGS]...
drdscomps¶
Generate plots comparing DR and DS (with BDT cuts shown).
tdub misc drdscomps [OPTIONS] DATADIR
Options
- -o, --outdir <outdir>¶
Output directory.
- --thesis¶
Flag for thesis label.
Arguments
- DATADIR¶
Required argument
soverb¶
Get signal over background using data in DATADIR and a SELECTIONS file.
the format of the JSON entries should be “region”: “numexpr selection”.
tdub misc soverb [OPTIONS] DATADIR SELECTIONS
Options
- -t, --use-tptrw¶
use top pt reweighting
Arguments
- DATADIR¶
Required argument
- SELECTIONS¶
Required argument
rex¶
Tasks interacting with TRExFitter results.
tdub rex [OPTIONS] COMMAND [ARGS]...
grimpacts¶
Print summary of grouped impacts.
tdub rex grimpacts [OPTIONS] REX_DIR
Options
- --tablefmt <tablefmt>¶
Format passed to tabulate.
- --include-total¶
Include FullSyst entry
Arguments
- REX_DIR¶
Required argument
impact¶
Generate impact plot from TRExFitter result.
tdub rex impact [OPTIONS] REX_DIR
Options
- --thesis¶
Flat to use thesis label.
Arguments
- REX_DIR¶
Required argument
impstabs¶
Generate impact stability tests based on rexpy output.
tdub rex impstabs [OPTIONS] HERWIG704 HERWIG713
Options
- -o, --outdir <outdir>¶
Output directory.
Arguments
- HERWIG704¶
Required argument
- HERWIG713¶
Required argument
index¶
Generate index.html file for the workspace.
tdub rex index [OPTIONS] REX_DIR
Arguments
- REX_DIR¶
Required argument
stabs¶
Generate stability tests based on rexpy output.
tdub rex stabs [OPTIONS] UMBRELLA
Options
- -o, --outdir <outdir>¶
Output directory.
- -t, --tests <tests>¶
Tests to run.
Arguments
- UMBRELLA¶
Required argument
stacks¶
Generate plots from TRExFitter result.
tdub rex stacks [OPTIONS] REX_DIR
Options
- --chisq, --no-chisq¶
Do or don’t print chi-square information.
- --internal, --no-internal¶
Do or don’t include internal label.
- --thesis, --no-thesis¶
Use thesis label
- --png, --no-png¶
Also save PNG version of plots.
- -n, --n-test <n_test>¶
Test only n plots (for stacks).
Arguments
- REX_DIR¶
Required argument
train¶
Tasks to perform machine learning steps.
tdub train [OPTIONS] COMMAND [ARGS]...
check¶
Check the results of a parameter scan WORKSPACE.
tdub train check [OPTIONS] WORKSPACE
Options
- -p, --print-top¶
Print the top results
- -n, --n-res <n_res>¶
Number of top results to print
- Default:
10
Arguments
- WORKSPACE¶
Required argument
fold¶
Perform a folded training based on a hyperparameter scan result.
tdub train fold [OPTIONS] SCANDIR DATADIR
Options
- -t, --use-tptrw¶
use top pt reweighting
- -n, --n-splits <n_splits>¶
number of splits for folding
- Default:
3
Arguments
- SCANDIR¶
Required argument
- DATADIR¶
Required argument
itables¶
Generate importance tables.
tdub train itables [OPTIONS] SUMMARY_FILE
Arguments
- SUMMARY_FILE¶
Required argument
prep¶
Prepare data for training.
tdub train prep [OPTIONS] DATADIR {1j1b|2j1b|2j2b} OUTDIR
Options
- -p, --pre-exec <pre_exec>¶
Python code to pre-execute
- -n, --nlo-method <nlo_method>¶
tW simluation NLO method
- Default:
DR
- -x, --override-selection <override_selection>¶
override selection with contents of file
- -t, --use-tptrw¶
apply top pt reweighting
- -r, --use-trrw¶
apply top recursive reweighting
- -i, --ignore-list <ignore_list>¶
variable ignore list file
- -m, --multiple-ttbar-samples¶
use multiple ttbar MC samples
- -a, --use-inc-af2¶
use inclusive af2 samples
- -f, --bkg-sample-frac <bkg_sample_frac>¶
use a fraction of the background
- -d, --use-dilep¶
train with dilepton samples
Arguments
- DATADIR¶
Required argument
- REGION¶
Required argument
- OUTDIR¶
Required argument
scan¶
Perform a parameter scan via condor jobs.
DATADIR points to the intput ROOT files, training is performed on the REGION and all output is saved to WORKSPACE.
$ tdub train scan /data/path 2j2b scan_2j2b
tdub train scan [OPTIONS] DATADIR WORKSPACE
Options
- -p, --pre-exec <pre_exec>¶
Python code to pre-execute
- -e, --early-stop <early_stop>¶
number of early stopping rounds
- Default:
10
- -s, --test-size <test_size>¶
training test size
- Default:
0.4
- --overwrite¶
overwrite existing workspace
- --and-submit¶
submit the condor jobs
Arguments
- DATADIR¶
Required argument
- WORKSPACE¶
Required argument
shapes¶
Generate shape comparison plots.
tdub train shapes [OPTIONS] DATADIR
Options
- -o, --outdir <outdir>¶
Directory to save output.
Arguments
- DATADIR¶
Required argument
single¶
Execute single training round.
tdub train single [OPTIONS] DATADIR OUTDIR
Options
- -p, --pre-exec <pre_exec>¶
Python code to pre-execute
- -s, --test-size <test_size>¶
training test size
- Default:
0.4
- -e, --early-stop <early_stop>¶
number of early stopping rounds
- Default:
10
- -k, --use-sklearn¶
use sklearn instead of lgbm
- -g, --use-xgboost¶
use xgboost instead of lgbm
- -l, --learning-rate <learning_rate>¶
learning_rate model parameter
- Default:
0.1
- -n, --num-leaves <num_leaves>¶
num_leaves model parameter
- Default:
16
- -m, --min-child-samples <min_child_samples>¶
min_child_samples model parameter
- Default:
500
- -d, --max-depth <max_depth>¶
max_depth model parameter
- Default:
5
- -r, --reg-lambda <reg_lambda>¶
lambda (L2) regularization
- Default:
0
- -a, --auto-region¶
Use parameters associated with region
- Default:
False
Arguments
- DATADIR¶
Required argument
- OUTDIR¶
Required argument