plot
¶
Module Contents¶
-
plot.
str2num
(s)¶ Converts parameter strings to appropriate types.
- Parameters
s (str) – Parameter value
- Returns
Appropriately converted value
- Return type
Varying
-
plot.
get_hparams
(in_days: ‘Number of input days [int]’, ‘option’ = 2, out_days: ‘Number of output days [int]’, ‘option’ = 1, binned: ‘Show the extended metrics for supplied comma separated binned FWI value range (e.g. 0,15,70) [Bool/list]’, ‘option’ = '0,5.2,11.2,21.3,38.0,50', case_study: ‘The case-study region to use for inference: australia, california, portugal, siberia, chile, uk [Bool/str]’, ‘option’ = False, benchmark: ‘Benchmark the FWI-Forecast data against FWI-Reanalysis [Bool]’, ‘option’ = False)¶ Process and print the dictionary of project wide arguments.
- Returns
Dictionary containing configuration options.
- Return type
dict
-
plot.
read_json
(results_file: str) → tuple¶ Read and process a json results summary
- Parameters
results_file (str) – path to json results
- Returns
binned metrics and results summary
- Return type
tuple
-
plot.
make_dict
(metric_list_dict: dict) → dict¶ Convert dict of list of dicts to dicts of dicts of dicts
- Parameters
metric_list_dict (dict) – dict of list of dicts
- Returns
dict of dict of dicts
- Return type
dict
-
plot.
single_day_plot
(result, hparams, m, benchmark=None)¶ Plot mteric results for single day output.
- Parameters
result (dict) – Model inference result dictionary
hparams (Namespace) – Hyperparamters
benchmark (dict, optional) – Benchmark result dictionary, defaults to None
m (str) – metric
-
plot.
multi_day_plot
(result, hparams, benchmark=None, m='acc')¶ Plot mteric results for single day output.
- Parameters
result (dict) – Model inference result dictionary
hparams (Namespace) – Hyperparamters
benchmark (dict, optional) – Benchmark result dictionary, defaults to None
m (str, optional) – metric
-
plot.
plot
(results_file, **kwargs) → None¶ Make plots. The kwargs are equivalent to commandline args
- Parameters
results_file (str) – json file of results