********** Scorecards ********** Description =========== A scorecard is a graphical representation of significance and performance of a comparison, normally a comparison between two models. The scorecard can only be produced using xml code. The xml code specifications are listed in the detail below. There is no GUI interface. EMC vs. NCAR Method of Determining p-values for Aggregation Statistics ====================================================================== In statistics, the p-value represents the probability of a statistic having a value at least as extreme as observed, in this case a difference between two models, given the null hypothesis that the two models come from the same distribution. When the p-values are large, there is evidence to reject this null hypothesis. The EMC and NCAR methods of determining p-values are largely the same, though the output is quite different. Both are based on estimates of the mean and standard deviation of the statistic. Along with the sample size, the standard Student's t value is calculated.When this value is compared with the known Student's t distribution, the significance level (i.e. p-value) is determined. The first difference between the two methods is the identification of the appropriate alpha/2 value. In the NCAR version, this value is determined exactly using the statistic and the appropriate sample size. In the EMC version, an approximate lookup table for the Student's t distribution is hard coded. Sample sizes are in four groups: < 20 cases, 20-40 cases, 40-80 cases, and > 80 cases. NCAR output contains the actual probability, while EMC output is grouped. Any non-significant differences are denoted by NA, significant differences fall into categories of 0.95, 0.99, and 1. Both systems use negative signs to denote a better statistic from the second model. P-values can also be determined by bootstrapping using the percentile method. Cases (e.g. days) are randomly selected with replacement, then the difference between the statistics for two models is determined based on that sample. This process is repeated a large number of times, resulting in an empirical distribution of the differences. To find the p-value, the total percent of the bootstrap differences that are more extreme than the observed difference are calculated. This is the estimated p-value. The only difference here is that the difference is compared to a resampled distribution rather than a known, theoretical distribution. Line Type ========= Scorecards can be run with either summary or aggregation logic. Aggregation logic is the default and generally, the better choice. The following are line types scorecards support: * CTC * SL1L2 * SAL1L2 * VL1L2 * VAL1L2 * PCT * GRAD * NBRCNT * ECNT * NBRCTC * RPS How-To ====== The scorecard module is used to generate a scorecard PNG and HTML images using data in the METviewer database. The usage statement: **Usage:** .. code-block:: none mv_scorecard.sh scorecard_example.xml where scorecard_example.xml is the XML that contains all of the scorecard specifications. The scorecard_example.xml passed to the scorecard module contains information about the scorecard that will be generated. This XML can be downloaded from this link: `scorecard_example.xml `_ .. literalinclude:: ../_static/xml/scorecard_example.xml Here is an explanation for the sections: **:** This is the top level tag. It stands for "plot specifications". Everything is defined in this tag. **:** Please reference the `Common XML Structures `_ documentation. **:** Specifies the Rscript instance to use, for example */usr/local/bin/Rscript*. **:** A structure that specifies the input and output file system folders. **:** The folder that contains the R templates used by METviewer, typically *R_tmpl/* from the METviewer CVS source tree. **:** The folder that will contain the data and generated R scripts, must contain the sub-folder *include/*. **:** The output folder that will contain generated image and HTML files. **:** The output folder that will contain generated data files. **:** The output folder that will contain scripts files. **:** A structure that specifies scorecard characteristics. **: Rscript** or **Python**, indicating whether to use Rscript or Python for the statistics calculation and plotting (if available). This is an optional element. The default value is Rscript. **: TRUE** or **FALSE**, indicating whether or not to display statistical values in the scorecard cells. The default value is FALSE (do not display). **: TRUE** or **FALSE**, indicating whether or not to display a symbol in the scorecard cells. The default value is TRUE (display). **: TRUE** or **FALSE**, indicating whether or not to display a legend for the scorecard. The default value is TRUE (display). **: NCAR** or **EMC**, which algorithm to use to calculate statistics. The default value is NCAR. **: FALSE** or **TRUE**, indicating whether or not to print SQL queries. The default value is FALSE (do not print). **: DIFF** (display a difference between models) or **DIFF_SIG** ( display p_value ) or **SINGLE** (display a value of statistic for the 1st model. In this case the value of the 2nd model is optional. This mode works only for **true** ), indicating which statistic to display for both - values and symbols - in the cell. The default value is DIFF_SIG (display p_value). or **: DIFF** (display a difference between models) or **DIFF_SIG** (display p_value) or **SINGLE** (display a value of statistic for the 1st model. In this case the value of the 2nd model is optional. This mode works only for **true** ), indicating which statistic to use to display for values in the cell. **: DIFF** (display a difference between models) or **DIFF_SIG** (display p_value) or **SINGLE** (display a value of statistic for the 1st model. In this case the value of the 2nd model is optional. This mode works only for **true** ), indicating which statistic to use to display for symbols in the cell. **:** full path to the XML file describing configurations for thresholds, colors and symbols (optional). **:** full path to the XML file describing configurations for weights definitions (optional). **:** a list of names for the most left columns as in NAME format. **:** a size for the symbols. It can be in '%' or 'px'. For example, '120%' will increase the size of symbols by 1.2 times. '20px' can also be used. **