# How behaviors are scored in Behavior recognition

Basic rules

For each sample in your track, EthoVision XT calculates a probability value for each behavior (see Behaviors detected with Behavior recognition). The sum of probability values is 100%.

All behaviors but Twitching and Hopping are mutually-exclusive states, that is, only one can be assigned to a sample. A behavior is assigned to a sample based on a number of decision rules that take into account the probability of that behavior relative to that of others, and the behaviors assigned to adjacent samples. See also the figure below.

▪Twitching and Hopping have their own probability, but are not compared with that of the others. As a result, Twitching and Hopping are scored independent of other behaviors. Each may be assigned to a sample also when one of the other behaviors is scored for that sample. For example, Hopping when Walking is active.

▪When two or more behaviors (excluded Twitching and Hopping) have similar probability values, and the same behaviors are not scored in adjacent samples, or when all behaviors have probability values below 25%, then none of the behaviors are scored for that sample. This results in gaps between scored behaviors when you visualize them in the Integrated Visualization.

Example

Below you see an example of how behaviors are scored based on their per-sample probability values. Top: X-Y chart of probability (here ranging from 0 to 1) of five behaviors (others are not shown for simplicity). Bottom: The resulting scored behaviors. In general, the behavior is assigned to a sample that has the highest probability (see for example Sniffing at the beginning of the time line). However, the state is smoothed based on the values in a number of samples before and after the current sample. For example, at 75 s Sniffing has a lower probability than Twitching, but the state Sniffing is still active. Note that Twitching is scored as a point event, with no duration, and is represented with a vertical segment.

The gap between scored states is caused by samples where two or more behaviors have similar probability values (for example at about 75.9 s, with Jumping and Walking having probabilities around 0.5) or the probability is below 0.25 for all behaviors. The example is taken from Rat Behavior Recognition data.

Behavior, “Not” Behavior and “Unknown”

Each behavior type, except Twitching and Hopping, has three complementary, mutually-exclusive states. For example, Grooming, Not Grooming and Unknown.

At any sample, the “Not” behavior is automatically scored if the corresponding behavior is not scored, unless Unknown is scored for that sample (see below).

Behavior “Unknown”

A behavior type is scored as Unknown in the following cases:

▪At the beginning of the track if the Trial Control Settings rule does not include an additional Time condition that waits three seconds before the start of tracking, and in the last portion of the track (see Behavior Recognition: Data, performance and accuracy).

▪When the nose and tail base points are not detected.

▪In all cases when the subject is not found or samples are missed for more than 0.4 s.

Statistics of Unknown can be calculated for all behaviors except Twitching. The statistics are the same for all behaviors. For example, the duration of Unknown calculated for Grooming is equal to that of Unknown for Rearing supported.