Exemplo n.º 1
0
def intergroup_zss(dtg):
    """dtg is output from droptree_groups"""
    ks = dtg.keys(0, 't', sort=True)
    ts = [clust.tup2tree(dtg[k]['_']) for k in ks]
    pw = _pairwise(ts, lambda x, y: clust.zssdist(x, y, dtg['names']))
    zz = _grpstats(dtg, pw)
    return (zz, pw)
Exemplo n.º 2
0
 def run(self, pars, out, messages):
     t = clust.tup2tree(pars['tree'])
     part = t.cut(min(pars['nclust'], len(t)))
     io = gd.Doc({'stims': pars['stims'], 'evts': part})
     if type(pars['shuff']) in [str, unicode]:
         mi, ie, oe = minf(io, pars['shuff'], True)
         mi = [mi]
     elif pars['shuff']:
         mi, ie, oe = minf_db(io, 'direct', ('shuffle', pars['shuff']))
     else:
         mi, ie, oe = minf(io, 'direct', True)
     out['stiment'] = ie
     out['respent'] = oe
     out['mi'] = mi