![Build Status](https://travis-ci.org/openworm/behavioral_syntax.svg?branch=master)
![Build Status](https://travis-ci.org/AidanRocke/behavioral_syntax.svg?branch=master)
![Coverage Status](https://coveralls.io/repos/AidanRocke/behavioral_syntax/badge.svg?branch=master&service=github)
briefly:
- This is a behavioral turing test derived from ideas in Andre Brown's behavioral syntax code: https://github.com/aexbrown/Behavioural_Syntax and other sources.
- The comparisons are based on the movement of individual worms in petri dishes in three different environments. Off food, on food, and with chemical gradients.
- For more information, please check the docs: http://behavioral-syntax.readthedocs.org/en/latest/
Main functions:
- extract a minimal number of template postures using Kmeans++
- discretize the video sequences of worm skeletons using this set of template postures
- use a simple time-warping algorithm to reduce the video sequences of postures to sequences that don't have
adjacent duplicates. i.e. {3,4,4,5,75,75,6,6,6} = {3,45,75,6}
- After step 3 is done, all kinds of NLP methods(ex. trigrams) or bio-informatic methods for discrete sequences of data may be used.
Dependencies:
- numpy
- pandas
- h5py
- statsmodels
- sklearn
- scipy
- matplotlib
- seaborn
- bokeh
Example of a template with 90 postures extracted using Kmeans++:
![hr] (https://raw.githubusercontent.com/openworm/behavioral_syntax/master/lab_reports/figures/postures.png)
Visualizing the tangent angle distance between postures:
![hr] (https://raw.githubusercontent.com/openworm/behavioral_syntax/master/lab_reports/figures/mds.png)