d85cce064570ba6ed7567eff457fce82ed862483,mlxtend/preprocessing/onehot.py,,one_hot,#Any#Any#Any#,10
Before Change
uniq = num_labels
if uniq == 1:
return np.array([[0.]], dtype=dtype)
return (np.arange(uniq) == yt[:, None]).astype(dtype)
After Change
else:
ary = np.zeros((len(y), uniq))
for i, val in enumerate(y):
ary[i, val] = 1
return ary.astype(dtype)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances
Project Name: rasbt/mlxtend
Commit Name: d85cce064570ba6ed7567eff457fce82ed862483
Time: 2016-03-12
Author: mail@sebastianraschka.com
File Name: mlxtend/preprocessing/onehot.py
Class Name:
Method Name: one_hot
Project Name: rasbt/mlxtend
Commit Name: 57f8762ce944396b23c13e6cb91d8d350506a38c
Time: 2016-03-16
Author: mail@sebastianraschka.com
File Name: mlxtend/preprocessing/onehot.py
Class Name:
Method Name: one_hot
Project Name: idaholab/raven
Commit Name: 0ca2ef263f600ee029f208dfca8fef7b8fe5038b
Time: 2020-08-23
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/GeneticAlgorithm.py
Class Name: GeneticAlgorithm
Method Name: _useRealization
Project Name: idaholab/raven
Commit Name: 078b2512f26bfb20aa3ecbb6a065008bf7d45753
Time: 2020-06-30
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/GeneticAlgorithm.py
Class Name: GeneticAlgorithm
Method Name: _useRealization