# Display Filter Variables

Variables, methods, and basic mathematical comparison operators (=, >, <,...) can be used to construct special conditions in order to select a particular set of Views. The available variables for each of the three tools are summarized in the following tables.

- All Tools

  Variable | Description
  --- | ---
  random | Generates a random variable in the interval [0,1] for each View.

- Red Analyze Tool

  Variable | Description
  --- | ---
  score | Returns the overall score of the Views (highest region score).
  T1,T2 | Returns the lower (T1) and higher (T2) thresholds (displayed in the Scores graph and the Threshold parameter).
  region/score | Returns the scores of the defective regions found by the system. This variable potentially returns a list of values (see the Notes section below for more information).
  region/area | Returns the area of the defective regions.
  region/x | Returns the horizontal position of the defective regions.
  region/y | Returns the vertical position of the defective regions.
  region!/(score│area│x│y) | Returns the score, area, horizontal or vertical values of labeled regions.
  background/score | Returns the background scores, i.e. scores that are outside of the defective regions.

- Green Classify Tool

  Variable | Description
  --- | ---
  tag/score | Returns the probability scores of each tag/class. This variable returns a list of values (see the Notes section below for more information).
  tag[Tag_Name]/score | Returns the predicted probability score pertaining to the class "Tag_Name".
  tag![Tag_Name] | Returns True for Views labeled with the tag/class "Tag_Name". This variable can also be used to select Views labeled with the tag "Tag_Name".
  tag!/score | Returns the probability score of the correct (labeled) class.
  tag![Tag_Name]/score | Returns the probability score of the correct class, selecting only Views labeled with the tag/class "Tag_Name".

- Blue Locate and Blue Read Tools

  Variable | Description
  --- | ---
  feature | Returns one or more found features in the View, and displays a thumbnail of the feature(s).
  feature[0] or feature[0,1] | Returns Views where the specified feature (0) is found (if used as a single statement, otherwise the list of found features; see the Notes section below for more information).
  feature![0] or feature![0,1,2] | Returns the same as above, except only for the specified feature that was labeled.
  feature[0]/score | Returns the probability scores for features marked (predicted) as 0.
  feature[0]/x | Returns the horizontal position of the feature 0.
  feature[0]/y | Returns the vertical position of the feature 0.
  feature![0]/(score│x│y) | Returns the score, horizontal or vertical position for the labeled feature 0.
  match | Returns True if a model was found, or a list of found models (see the Notes section below for more information).
  match[Model1] | Returns the same as above, but only if Model1 was found.
  match![Model1] | Returns the same as above, but for a model found among the labeled features.
  match[Model1]/score | Returns the scores of the found model (Model1). This variable can potentially return a list of values; see the Notes section below for more information.
  match[Model1]/angle | Returns the angles of the found models.
  match[Model1]/scale | Returns the scales of the found models.
  match[Model1]/schear | Returns the shearing of the found models.
  match[Model1]/x | Returns the horizontal positions of the found models.
  match[Model1]/y | Returns the vertical positions of the found models.
  match![Model1]/(score│angle│scale│shear│x│y) | Returns the same as above, but for a model with labeled features.
  match/features | Returns the number of marked features in any model matched by the system (potentially returns a list of values; see the Notes section below for more information).
  match[Model1]/features | Same as above, but for specific model Model1.
  match!/features | Number of features of any model matched among labeled features.
  match![Model1]/features | Same as above, but for specific model Model1.

Note:

Some variables might return a list of values (whenever there are many possible values as an output). Some properties (the number of elements, the maximum or the minimum) of such returned lists can be extracted with the methods described below.

Tool | Example | Remark
--- | --- | ---
Red Analyze | region/(score│area│x│y) | Returns a list of scores, with each value corresponding to one found region. A probability score always lies in the interval of [0,1]. The Red Analyze tool returns a probability score only when used in Supervised mode (e.g. the probability of a region to be defective).
Green Classify | tag/score | Returns the list of probabilities for each class. A probability score always lies in the interval of [0,1]. In addition, the list of values returned by tag/score add up to 1.
Blue Locate Blue Read | feature, match | Returns true as a single statement, otherwise will return a list of found features or models.
feature![0]/(score│x│y) | Returns the scores, horizontal or vertical positions of the labeled feature 0.
match[Model1]/(score│angle│scale│shear│x│y) | Returns the list of scores, angles, scale, shear, horizontal or vertical positions of any found model (Model1).