8.1.0.4. Meters
(packages/gblearn2/gb-meters.lsh)

Author(s): Yann LeCun

Meters are classes used to measure the performance of learning machines. There are several types of meters for each specific situation. meters are generally assumed to have at least the following methods: Methods are provided to compute and display the information measured by a meter.

8.1.0.4.0. (same-class? actual desired [dummies])
(packages/gblearn2/gb-meters.lsh)


return 0 if actual equals -1, otherwise, return 1 if actual and desired are equal, -1 otherwise.

8.1.0.4.1. classifier-meter
(packages/gblearn2/gb-meters.lsh)


a class that can be used to measure the performance of classifiers. This is a simple version that does not record anything but simply computes performance measures.

8.1.0.4.1.0. (new classifier-meter [comparison-function])
[CLASS] (packages/gblearn2/gb-meters.lsh)


Create a new classifier-meter using comparison-function to compare actual and desired answers. By default the same-class? function is used for that purpose. It takes two integer arguments, and returns 1 if they are equal, -1 if they are different, and 0 if the first argument is -1 (which means reject).

8.1.0.4.1.1. (==> classifier-meter clear)
[MSG] (packages/gblearn2/gb-meters.lsh)


reset the meter. This must be called before a measurement campaign is started.

8.1.0.4.1.2. (==> classifier-meter update age actual desired energy)
[MSG] (packages/gblearn2/gb-meters.lsh)


update the meter with results from a new sample. age is the number of training iterations so far, actual (a class-state ) the actual output of the machine, desired (an idx0 of int) the desired category, and energy (an idx0-state) the energy.

8.1.0.4.1.3. (==> classifier-meter info)
[MSG] (packages/gblearn2/gb-meters.lsh)


return a list with the age, the number of samples (number of calls to update since the last clear), the average energy, the percentage of correctly recognize samples, the percentage of erroneously recognized samples, and the percentage of rejected samples.

8.1.0.4.1.4. (==> classifier-meter display)
[MSG] (packages/gblearn2/gb-meters.lsh)


Display the meter's information on the terminal. namely, the age, the number of samples (number of calls to update since the last clear), the average energy, the percentage of correctly recognize samples, the percentage of erroneously recognized samples, and the percentage of rejected samples.