IR2Vec
Loading...
Searching...
No Matches
OpenKE.data.TestDataLoader.TestDataLoader Class Reference
Inheritance diagram for OpenKE.data.TestDataLoader.TestDataLoader:
Collaboration diagram for OpenKE.data.TestDataLoader.TestDataLoader:

Public Member Functions

 __init__ (self, in_path="./", sampling_mode="link", type_constrain=False)
 
 read (self)
 
 sampling_lp (self)
 
 sampling_tc (self)
 
 get_ent_tot (self)
 
 get_rel_tot (self)
 
 get_triple_tot (self)
 
 set_sampling_mode (self, sampling_mode)
 
 __len__ (self)
 
 __iter__ (self)
 

Public Attributes

 lib = ctypes.cdll.LoadLibrary(base_file)
 
 in_path = in_path
 
str sampling_mode = sampling_mode
 
 type_constrain = type_constrain
 
 relTotal = self.lib.getRelationTotal()
 
 entTotal = self.lib.getEntityTotal()
 
 testTotal = self.lib.getTestTotal()
 
 test_h = np.zeros(self.entTotal, dtype=np.int64)
 
 test_t = np.zeros(self.entTotal, dtype=np.int64)
 
 test_r = np.zeros(self.entTotal, dtype=np.int64)
 
 test_h_addr = self.test_h.__array_interface__["data"][0]
 
 test_t_addr = self.test_t.__array_interface__["data"][0]
 
 test_r_addr = self.test_r.__array_interface__["data"][0]
 
 test_pos_h = np.zeros(self.testTotal, dtype=np.int64)
 
 test_pos_t = np.zeros(self.testTotal, dtype=np.int64)
 
 test_pos_r = np.zeros(self.testTotal, dtype=np.int64)
 
 test_pos_h_addr = self.test_pos_h.__array_interface__["data"][0]
 
 test_pos_t_addr = self.test_pos_t.__array_interface__["data"][0]
 
 test_pos_r_addr = self.test_pos_r.__array_interface__["data"][0]
 
 test_neg_h = np.zeros(self.testTotal, dtype=np.int64)
 
 test_neg_t = np.zeros(self.testTotal, dtype=np.int64)
 
 test_neg_r = np.zeros(self.testTotal, dtype=np.int64)
 
 test_neg_h_addr = self.test_neg_h.__array_interface__["data"][0]
 
 test_neg_t_addr = self.test_neg_t.__array_interface__["data"][0]
 
 test_neg_r_addr = self.test_neg_r.__array_interface__["data"][0]
 
 sampling_lp
 
 sampling_tc
 

The documentation for this class was generated from the following file: