Exemplo n.º 1
0
def get_rand_pairs(db, N):
    """ Get a (generator) list (length N) of random pairs (x,y) of patents."""
    sampler = PatentSampler(db, 'traits')
    rand_pats = sampler.sample(N*2)
    rand_pairs = ((rand_pats[2*i], rand_pats[2*i+1]) for i in range(N))
    return rand_pairs
Exemplo n.º 2
0
 def testPatnsWorks(self):
     sampler = PatentSampler(self.db, 'patns')
     sampler.sample(1)
Exemplo n.º 3
0
 def testTraitsWorks(self):
     sampler = PatentSampler(self.db, 'pat_text')
     sampler.sample(1)
Exemplo n.º 4
0
 def testTraitsWorks(self):
     sampler = PatentSampler(self.db, 'just_cites')
     sampler.sample(1)
Exemplo n.º 5
0
 def testCiteNetWorks(self):
     sampler = PatentSampler(self.db, 'cite_net')
     sampler.sample(1)