Analysis of behavioral changes

We categorize the behaviors into three types :

  • In the first category (hand: red curve) are mouvements of the arm that did not grab any stick and thus not moved the out-of-reached object.
  • The second category (stick: green curve) are mouvements that did grab one of the two sticks but did not touch the object with it.
  • The third category (object: blue curve) contains the mouvements where both a stick was grabbed and the object was moved by the stick.

We define Overlapping Waves as patterns of behaviors that follow all of the three following criterions.

Criterions:

  • stick increases quikly from 0 to more than 10 (potentially after an initial phase with a steady low value), and is followed by a plateau (steady curve with small slope) and no abrupt changes.
  • object increases quikly from 0 to more than 10 (potentially after an initial phase with a steady low value), and is followed by a plateau (steady curve with small slope) and no abrupt changes.
  • object starts to raise at least 1000 iterations after stick started to raise.

In [55]:
img_path = "../data/2016-01-26_14-37-37-Tools-cogsci-xp1/img/"

In [56]:
analysis_results = {}

In [76]:
from IPython.display import Image, HTML, display
from glob import glob

def analysis(config):
    im_list = []
    imagesList=''.join( ["<img style='width: 90px; height: 60px; margin: 2px; float: left; border: 1px solid black;' src='%s' />" % str(s) 
                         for s in [img_path + '{}-log{}-events-100000.png'.format(config, trial) for trial in range(1, 101)]])
    #print imagesList
    display(HTML(imagesList))

In [77]:
analysis(config)



In [78]:
analysis_results["F-RmB"] = 0

In [79]:
analysis("F-RGB")



In [85]:
analysis_results["F-RGB"] = 0

In [80]:
analysis("H-RGB-RMB")



In [86]:
trials_criterion_ok = [
    1,0,1,1,1,0,1,1,1,0,
    0,0,1,1,0,1,0,1,0,0,
    0,1,0,0,1,0,0,0,1,0,
    1,1,0,0,1,1,1,0,1,1,
    0,0,0,0,1,0,1,1,0,1,
    1,1,1,1,0,1,0,1,1,1,
    1,0,1,1,1,0,1,0,0,1,
    1,0,1,1,0,1,1,0,0,1,
    0,1,1,1,1,0,0,1,0,1,
    1,1,1,1,1,1,1,1,0,1,
]

analysis_results["H-RGB-RMB"] = sum(trials_criterion_ok)

In [81]:
analysis("H-RGB-P-AMB")



In [87]:
trials_criterion_ok = [
    1,0,1,1,0,0,1,0,1,1,
    1,1,1,0,1,1,1,0,1,0,
    1,1,1,1,1,1,1,1,0,0,
    0,1,0,0,0,0,1,1,1,0,
    1,1,0,1,1,0,1,1,0,1,
    0,1,1,1,1,1,1,1,1,1,
    1,0,1,1,1,1,0,0,0,1,
    1,0,1,1,0,1,1,1,1,1,
    1,0,1,1,1,1,0,1,0,1,
    1,1,1,0,0,1,1,1,1,1,
]

analysis_results["H-RGB-P-AMB"] = sum(trials_criterion_ok)

In [82]:
analysis("H-RGB-GR-AMB")



In [88]:
trials_criterion_ok = [
    0,1,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,1,0,0,0,0,
    0,0,1,0,0,0,0,0,0,0,
    0,0,0,0,1,0,0,0,0,0,
    1,0,0,0,0,0,0,0,0,0,
    0,1,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,1,0,0,0,
]

analysis_results["H-RGB-GR-AMB"] = sum(trials_criterion_ok)

In [83]:
analysis("H-RGB-P-AMB-PGITC")



In [89]:
trials_criterion_ok = [
    1,1,1,1,1,0,0,0,0,1,
    1,1,1,1,1,1,1,0,1,1,
    1,1,1,1,1,1,0,0,1,0,
    1,1,1,1,1,1,0,0,1,0,
    1,0,1,1,1,1,1,0,1,0,
    1,1,0,1,1,0,1,1,1,1,
    1,1,1,1,1,1,1,0,1,1,
    1,1,1,1,0,1,1,1,1,1,
    1,1,1,1,1,1,1,0,0,1,
    1,1,1,1,1,1,0,1,1,1,
]

analysis_results["H-RGB-P-AMB-PGITC"] = sum(trials_criterion_ok)

In [90]:
print analysis_results


{'F-RmB': 0, 'H-RGB-P-AMB-PGITC': 79, 'H-RGB-GR-AMB': 7, 'H-RGB-RMB': 60, 'F-RGB': 0, 'H-RGB-P-AMB': 70}