Skip to content

Results

Avgoustinos Vouros edited this page Jul 25, 2017 · 36 revisions

This section will focus on the results generated by pressing the buttons of the Results panel of the main menu.

Contents

  1. Demo
  2. Metrics
  3. Strategies
  4. Transitions
  5. Probabilities
  6. Class Statistics
  7. The Friedman Test
  8. Other Results

Demo

The demo button runs a full analysis using the original rat data from EPFL (see Gehring, Tiago V., et al.). The manuscript containing the new analysis results is under preparation.

Metrics

Generates figures showing the (a) the escape latency; (b) the average movement speed and (c) the average path length of the animals over the trials for one or two animal groups. In each case 2 figures are generated; the first illustrate the results as a boxplot (bars represent the first and third quartiles of the data; the gray or white line splitting the bars is the median, whiskers indicate the minimum and the maximum values and crosses are the outliers.) and the second illustrate the results as a barplot. The raw numbers of the boxplots are also saved in separate CSV files. Requires a default segmentation to be selected in order to run and in case more than one animal groups are specified then a dialog box with pop-up asking for which one or two groups the result will be generated. If two groups are provided then the white lines will refer to the first specified group and the black lines to the second. Moreover, in this case, the p-values of the Friedman test will be computed (see Friedman Test) and saved inside the Friedman_p.csv file. The Friedman test is computed throughout the trials (column 2) or throughout the days (column 3).

Any result will be saved on the results folder of the project inside a folder called metrics and inside a subfolder specifing the selected group(s).

metrics

Strategies

Generates figures showing the number of segments for each strategy adopted by the animals throughout the trials. For each strategy 2 figures are generated; the first illustrate the number of segments falling under each class on each trial as a boxplot (bars represent the first and third quartiles of the data; the gray or white line splitting the bars is the median, whiskers indicate the minimum and the maximum values and crosses are the outliers.) and the second illustrate the same results as percentages for each trail in a barplot. The raw numbers of the boxplots are also saved in separate CSV files. Requires a default segmentation and a default classification to be selected in order to run and in case more than one animal groups are present then a dialog box with pop-up asking for which one or two groups the result will be generated. If two groups are provided then the white lines will refer to the first specified group and the black lines to the second. Moreover, in this case, the p-values of the Friedman test will be computed (see Friedman Test). This process will be repeated number of iterations times.

Any result will be saved on the results folder of the project inside a folder with name Strategies-class _ [number of labels] _ [number of segments] _ [segments length] _ [segments overlap] _ [number of classifiers used] _ [number of iterations] _ [merging rule] [optional: -user note]. This folder will contain a number of subfolders depending on the [number of classifiers] or the [number of iterations] used for the selected classification and they will be named after g[animal group(s)]res_[x] ([x] equals 1 to number of classifiers] or the [number of iterations]) and one more subfolder g[animal group(s)]res_summary. Each of these subfolders will contain results in both image and CSV format. Specifically the final 'summary' subfolder will contain the average results of all the generated results and some more files:

  • pvalues_summary: Contains a summary of all the p-values with an additional column having a score showing the agreement (how many classifiers or ensembles agree on each strategy that there is significant difference between the two animal groups).

  • binomial: A collection of plots showing the 95% binomial confidence intervals for the classifiers or the ensembles regarding their agreement, if there is significant difference between the two specified animal groups on each strategy or not. Squares indicate the mean of the classifiers/ensembles that point out that there is significant difference on each strategy; errorbars are the 95% confidence intervals; the dashed line indicates the threshold of interest (0.5 or 50%). In order to be confident that there is indeed a significant difference between the two animal groups on each strategy and the strategy transitions the confidence intervals should be clearly above 0.5 (or 50%). Raw information are also extracted in a TEXT file.

  • pvalues_summary: Contains a figure of all the p-values of each strategy plotted in boxplots format.

strategies

strategies

Note: In case the user does not wish to run the Friedman test but requires the classification results for custom analysis then this procedure may be run multiple times and each time a different group may be selected. Inside the appropriate folder there will also be two CSV files containing the raw classification results arranged as follows:

  • AnimalID: The ID of the animal which performed this trajectory.

  • Trajectory: The ID of the trajectory.

  • TrialNo: The trial in which this swimming path was performed.

  • OriginalGroup: The group of the animal as specified in the beginning of the project.

  • TargetGroup: The new group of the animal in case animal groups has been merged prior to the results generation (refer to .......).

  • Behaviours_: The rest of the row contains the class ID (file: RawData.csv) for each one of the segments of the trajectory (refer to ..... for the class IDs) or the time that the animal spent performing each strategy (file: RawData_time.csv).

strategies

Transitions

Generates a figure showing the number of transitions between strategies adopted by the animals over the trials. Requirements and results are equivalent to the ones described on the strategies section above.

Probabilities

Calculates the transition probabilities of strategies adopted by the animals within trials. Requires a default segmentation and a default classification to be selected in order to run and in case more than one animal groups are specified then a dialog box with pop-up asking for which one or two groups the result will be generated.

Any result will be saved on the results folder of the project inside a folder with name Transitions-class _ [number of labels] _ [number of segments] _ [segments length] _ [segments overlap] _ [number of classifiers used] _ [number of iterations] _ [merging rule] [optional: -user note]. This folder will contain a number of subfolders depending on the [number of iterations] used to generate the selected default classification named after g[animal group(s)]res_[x] ([x] equals 1 to [number of iterations]) and one more subfolder g[animal group(s)]res_summary. Each of these subfolders a TEXT-file (.txt) containing the results. The final 'summary' subfolder will contain the average results exported in a CSV-file (.csv).

probabilities

Class Statistics

Calculates the number of strategies detected by each merged classifier along with the average and computes the agreement between the merged classifiers. Requires a default segmentation and a default classification to be selected in order to run.

Generates two CSV-files (.csv) which holds the results, one contains numerical results and the other percentages. These files are generated inside the subfolder statistics-class _ [number of labels] _ [number of segments] _ [segments length] _ [segments overlap] _ [number of classifiers used] _ [number of iterations] _ [merging rule] [optional: -user note].

statistics

Moreover, it generates a series of CSV-files (.csv) which contain the agreement of each merged classifier with the other merged classifiers (results also exported in MAT-format (.mat)):

agreement

Finally an overall 'agreement matrix' of the classification agreement is generated and exported as an image file (multiple files may be generated each one holding a 10x10 grid of the overall matrix. In that case the 10x10 grid will move from up to down and from right to left), agreement _matix_icon1.[specified image format], a CSV-file (.csv), agreement _matrix.csv and a MAT-file (.mat), agreement _matrix.mat.

agreement  matrix

The Friedman Test

In case two animal groups are specified with uneven number of animals then a some animals needs to be excluded from the group with the most animals in order for both groups to have the same number of animals. This is a requirement of the Friedman test. To discard animals the following window will appear:

equalize_groups

  1. Information on how many animals exist in each of the two specified groups and how many animals need to be removed from one of them in order for both groups to have the same number of animals.

  2. The left listbox lists all the animal ids of the group with the larger number of animals. Each of these ids can be selected and moved to the right listbox which will contain the excluded animals. The buttons => and <= are used to move the animal ids between the two listboxes. If the button => is greyed then no more animals may be excluded as the two groups are now having the same number of animals. If <= is greyed then the right listbox does not have any animal ids.

  3. In order to ease the exclusion process four sort buttons are placed which sort the animal ids by animal speed (Sort by Speed), animal path length (Sort by Path Length), animal latency (Sort by Latency) and animal id value (Sort by Value). The animals are always sorted in ascending order.

  4. After the appropriate number of animal ids has been reached the OK button will become clickable and pressing it would resume the program's result process. Clicking the Cancel button will return the main menu.

Other Results

  • The folder exported_pics_segmentation_[number] contains image files (.jpeg) of the segments exported via Browse Trajectories. Each file has a specific name traj[number].jpeg or traj[number]seg[number].jpeg showing the exact location of the trajectory or segment.

  • The folder labels _ [number of labels] _ [segments length] _ [segments overlap] _ cross _ validation contains the three figures of Labelling Quality and a CSV-file (.csv) containing the figures' values.

Clone this wiki locally