c1431d47ce335327c5213cef7bb7ae4f4d2d29b3,dragonn/generators.py,DataGenerator,__init__,#DataGenerator#,37
Before Change
//read in the label bed file
data=pd.read_csv(data_path,header=0,sep="\t",index_col=[0,1,2])
if tasks!=None:
data=data[tasks]
self.data=data
self.indices=np.arange(self.data.shape[0])
num_indices=self.indices.shape[0]
After Change
self.pos_indices=np.repeat(self.pos_indices,num_pos_wraps)[0:num_indices]
np.random.shuffle(self.pos_indices)
self.neg_indices=np.repeat(self.neg_indices,num_neg_wraps)[0:num_indices]
np.random.shuffle(self.neg_indices)
def __len__(self):
return math.floor(self.data.shape[0]/self.batch_size)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: kundajelab/dragonn
Commit Name: c1431d47ce335327c5213cef7bb7ae4f4d2d29b3
Time: 2019-02-06
Author: annashcherbina@gmail.com
File Name: dragonn/generators.py
Class Name: DataGenerator
Method Name: __init__
Project Name: maciejkula/spotlight
Commit Name: fde2f66676f960782c993f7148927c4a4197ab10
Time: 2017-06-27
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/explicit.py
Class Name: ExplicitFactorizationModel
Method Name: fit
Project Name: yahoo/TensorFlowOnSpark
Commit Name: abfd430f17c08d1b8829a7e58e3d873bda95c39c
Time: 2018-03-26
Author: leewyang@gmail.com
File Name: examples/mnist/tf/mnist_dist_dataset.py
Class Name:
Method Name: map_fun