11.8.4 Comparing Different Stats with Each Other

The CompareStat provides a general way of comparing the results of different statistics with each other. Thus, one can actually use statistics to analyze one's data on-line, instead of dumping it all to a file and analyzing it after the fact.

The compare stat contains pointers to two other stats, stat_1 and stat_2, which provide the data to compare. The data consists of any stat val data that can be found on these stats. Ideally, they both have the same number of data values, typically in their copy_vals group (e.g., from MonitorStats that are COPYing activations from two sets of units that are being compared).

The types of comparisons are simply different distance functions that measure the distances between the two stat's data:

CompareType cmp_type
This is the type of distance function to use in making the comparison:
COVAR
covariation
CORREL
correlation
INNER_PROD
inner product
EUCLID_DIST
euclidean distance
SUM_SQ_DIST
sum of squares distance
HAMMING_DIST
hamming distance
float dist_tol
This is a tolerance value for distance comparisons, where absolute differences below this amount result in a 0 distance component.
bool norm
If this flag is checked, and one of the distance comparisons is being performed, the values participating in the distance computation will be normalized to a zero-one range prior to computation. If the INNER_PROD is being taken, this will result in a normalized inner-product measure (dividing by the magnitudes of the individual weight vectors).
PreProcessVals pre_proc_1,2,3
These allow for three steps of pre-processing on the values before they are compared. These members specify an operation and, optionally, arguements to that operation in the arg member. Note that the thresholding function THRESH compares the value to the arg, and gives a result of hi if it is greater-than-or-equal, and lo if it is less-than the arg.