Ejemplo n.º 1
0
 def _do_mc(self):
     G = self.rgg.generate_graph()
     for eps in self.epsRange:
         Gerr = rg.get_errorful_subgraph(G, int(self.errFunc(eps)), eps)
         self.embed.embed(Gerr)
         for d in self.dRange:
             x = self.embed.get_scaled(d)
             
             vnRes = vn.vn_metrics(x, self.observed, self.notObserved)
             vnRes.run() 
             self.vnResults[(eps,d)].append(vnRes)
             
             mclustRes = vn.mclust_performance(x,self.block)
             mclustRes.run()
             self.mclustResults[(eps,d)].append(mclustRes)
             
             kmeansRes = vn.kmeans_performance(x, self.block, self.kRange)
             kmeansRes.run()
             self.kmeansResults[(eps,d)].append(kmeansRes)
Ejemplo n.º 2
0
    def _do_mc(self):
        
        for eps in self.epsRange:
            block_prob = (1-self.post1(eps)-(1-self.post0(eps)))*self.rgg.block_prob+(1-self.post0(eps))
            
            rggErr = rg.SBMGenerator(block_prob,self.rgg.nvec)
            Gerr = rggErr.generate_graph()
            self.embed.embed(Gerr)
            for d in self.dRange:
                x = self.embed.get_scaled(d)
                
                vnRes = vn.vn_metrics(x, self.observed, self.notObserved)
                vnRes.run()     
                self.vnResults[(eps,d)].append(vnRes)
                
#                mclustRes = vn.mclust_performance(x,self.block)
#                mclustRes.run()
#                self.mclustResults[(eps,d)].append(mclustRes)
                
                kmeansRes = vn.kmeans_performance(x, self.block, self.kRange)
                kmeansRes.run()
                self.kmeansResults[(eps,d)].append(kmeansRes)