Segmentation v2 - RodentDataAnalytics/mwm-ml-gen GitHub Wiki

After filling the data input section of the program (Paths & Files Format, Experiment Settings and Experiment Properties) the user is able to proceed to the Segmentation process.

Contents

  1. Segmentation Overview
  2. The Segmentation Panel
  3. Assigning Animals to Groups

Segmentation Overview

As described in the publication, compared to previous approaches that attempted to categorise the behaviour of animals by using the whole swimming paths, this approach first splits the animal trajectory inside the Morris Water Maze into segments and then tries to classify each one of them. In that way the difficulty of classifying long animal trajectories exhibiting many different kinds of behaviour is overcome.

The segmentation process works as follows: each trajectory is divided into N segments of length d. Each segment overlaps with previous segments (by an h percentage) to reduce the classification variance due to unfavourable segmentations.

The Segmentation Panel

  • Segmentation Length: Specifies the length d of the segments (small variations may apply due to the the discrete nature and spacing of available data points).

  • Segment Overlap: Specifies the percentage of overlap (h) between the segments. h needs to be positive and less or equal to 1.

  • Segmentation (Button): If the above information (including the data input section of the program) is provided correctly then the program reads the animal trajectories and segments them. Moreover, it computes the features of the trajectories and the segments. When the process is finished all the values are stored inside an object called segmentation_configs_#id which is stored inside the specified Output Folder. Before the segmentation process is started the user is given the option to assign animals to groups of his choice. For more info refer to section Assigning Animals to Groups.

- **Segment Configuration Object path** This textfield shows the full path of the *segmentation\_configs\_#id* object created from the segmentation process. This will be the default object for the rest of the program. If the user wants to use another segmentation object then he needs to specify its path here. *Note: the generated id has the following format DATE (yyyy-mm-dd) & TIME (hh-mm), for example segmentation\_configs\_2016-07-13-17-45 means the segmentation object created on 13/July/2016 at 17:45* ![segmentation](https://github.com/avouros/Wiki-Material/blob/master/roda/v2/gui_5.jpg)

Assigning Animals to Groups

Upon pressing the 'Segmentation' button the following dialogue box pops-up:

![animal groups question](https://github.com/avouros/Wiki-Material/blob/master/roda/v2/animal_groups_1.jpg)
  • No: No groups, all animals will belong to the same group named group 1.
  • Yes: The user is directed to another the following GUI:
![animal groups GUI](https://github.com/avouros/Wiki-Material/blob/master/roda/v2/animal_groups_2.jpg)
  • Animal IDs: This listbox lists all the animal IDs of the selected session. To change the session use the navigation buttons <= => (previous session / next session). The listbox allows multi-selection.

  • Group Number & Assign: The 'Assign' button assigns (the selected from the listbox) animal ID(s) to a group specified by a number provided in the empty textfield. The groups need to be numeric and the empty value is also allowed as a group number.

  • Table: The table shows all the animal IDs for all the session and the groups they are assigned to.

  • Save: The 'Save' button creates a CSV file containing all the animal IDs and the groups they are assigned to. An example of such a file is shown in the picture below:

animal groups GUI

  • Load: The 'Load' button loads a CSV file containing animal groups. The Table is updated accordingly.

  • Cancel: Automatically all animals are assigned to the same group named group 1 and the Segmentation process begins.

  • OK: All animals are assigned to the groups as shown on the Table. Animals that are not assigned to any group (Group_# is empty), then the following dialogue box pops-up:

ungrouped animals

  • No: The user is returned to the previous GUI.
  • Yes: Animals without group are automatically assigned to Group X, where X equals the the first available number that the user hasn't used (e.g. if group numbers 1,3,4 already exists then X will be equal to 1. if group numbers 1,2,3 already exists then X will be equal to 4). The program then continues with the Segmentation process.
⚠️ **GitHub.com Fallback** ⚠️