sample_mdape - bruno-beloff/scs_analysis GitHub Wiki

docs > software repositories > scs_analysis > commands > filtering and aggregating data


DESCRIPTION

The sample_mdape utility is used to compute Median Absolute Percent Error (MdAPE). Output is in the form of either a scalar MdAPE value, or an array of data points.

If the --errors flag is set, then the utility outputs an array of JSON documents specifying the reference, prediction and error value for each input document. Otherwise, the utility reports the computed MdAPE value.

SYNOPSIS

sample_mdape.py [-p PRECISION] [-e] [-v] REFERENCE_PATH PREDICTION_PATH

Options
--version show program's version number and exit
-h, --help show this help message and exit
-p PRECISION, --prec=PRECISION precision (default 3 decimal places)
-e, --errors output the error values
-v, --verbose report narrative to stderr

EXAMPLES - MdAPE

csv_reader.py -v collocation-data.csv | sample_mdape.py -v src.ref.PM1 exg.PM1.vB.opc-mash.Y22

EXAMPLES - ERRORS

csv_reader.py -v collocation-data.csv | sample_mdape.py -e -v src.ref.PM1 exg.PM1.vB.opc-mash.Y22 | histo_chart.py -vb -x 0 100 -c 100 ape

DOCUMENT EXAMPLE - ERRORS

[{"src.ref.PM1": 2.47, "exg.PM1.vB.opc-mash.Y22": 2.7, "ape": 9.312}, ...]

RESOURCES

MdAPE - Median Absolute Percentage Error