def get_child_parset_rand(db, N): s = PatentSampler(db, 'traits') """ Get a (generator) list (length N) of two-tuples (child,parents), where parents is a list of patents which are cited by child. Must make some choice about how many parents each patent has (use average?)""" pass
def get_par_childset_rand(db, N): s = PatentSampler(db, 'traits') """ Get a (generator) list (length N) of two-tuples (parent, children) where children is a list of patents which cite parent. Must make some choice about how many children each patent has (use average?)""" pass
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
def testPatnsWorks(self): sampler = PatentSampler(self.db, 'patns') sampler.sample(1)
def testTraitsWorks(self): sampler = PatentSampler(self.db, 'just_cites') sampler.sample(1)
def testTraitsWorks(self): sampler = PatentSampler(self.db, 'pat_text') sampler.sample(1)
def testCiteNetWorks(self): sampler = PatentSampler(self.db, 'cite_net') sampler.sample(1)