50efccc10d7dd32caf913b7da3059551dd7739d6,deepchem/splits/__init__.py,StratifiedSplitter,__generate_required_hits,#StratifiedSplitter#Any#Any#,96
Before Change
required_hit_dict = {}
totalCount = len(y_df.index)
for col in y_df:
NaN_count = y_df[col].isnull().sum()
notNaN = totalCount - NaN_count
requiredNotNaN = frac_train * notNaN
required_hit_dict[colIndex] = requiredNotNaN
colIndex += 1
return required_hit_dict
def __generate_required_index(self, y_df, required_hit_dict):
After Change
def __generate_required_hits(self, w, frac_train):
required_hits = (w != 0).sum(0)//returns list of per column sum of non zero elements
for colHits in required_hits:
colHits = int(frac_train * colHits)
return required_hits
def __generate_required_index(self, w, required_hit_list):
colIndex = 0
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: deepchem/deepchem
Commit Name: 50efccc10d7dd32caf913b7da3059551dd7739d6
Time: 2016-08-01
Author: apappu97@gmail.com
File Name: deepchem/splits/__init__.py
Class Name: StratifiedSplitter
Method Name: __generate_required_hits
Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: 249a1a53fe07a903d01d59fb69437c300b59461f
Time: 2016-06-18
Author: glemaitre@visor.udg.edu
File Name: unbalanced_dataset/under_sampling/instance_hardness_threshold.py
Class Name: InstanceHardnessThreshold
Method Name: transform
Project Name: senarvi/theanolm
Commit Name: eb8b70c825ef3e02818cbfa95c0f8a9ec4184275
Time: 2015-12-25
Author: seppo.git@marjaniemi.com
File Name: theanolm/network.py
Class Name: Network
Method Name: __init__
Project Name: facebookresearch/ParlAI
Commit Name: bda270d6255bca6c9518f4f6e8d2cdee8cd6a40c
Time: 2018-08-29
Author: ahm@fb.com
File Name: parlai/agents/seq2seq/modules.py
Class Name: Encoder
Method Name: forward