Esempio n. 1
0
 def compute_zscores(self):
     self.zscores = numpy.zeros(13)
     for mtf_num in xrange(1, 14):
         tricode = net_subs.num2tricode[mtf_num]
         self.zscores[mtf_num - 1] = stats.compute_zscore(
                 self.mtf_counts.get(tricode, 0.0),
                 [rnd.mtf_counts.get(tricode, 0.0) for rnd in\
                 self.random_graphs])
Esempio n. 2
0
 def compute_tsp(self):
     if not self.mtf_counts:
         self.mtf_counts = net_subs.triadic_census(self)
     zscores = numpy.zeros(13)
     for mtf_num in xrange(1, 14):
         tricode = net_subs.num2tricode[mtf_num]
         zscores[mtf_num - 1] = stats.compute_zscore(
                 self.mtf_counts.get(tricode, 0.0),
                 [rnd.mtf_counts.get(tricode, 0.0) for rnd in\
                 self.random_ensemble])
     return zscores