cd000fd96342d660c4f7d2d21eab9888fbab3526,deslib/util/prob_functions.py,,min_difference,#Any#Any#,205
Before Change
n_samples = len(idx_correct_label)
C_src = np.zeros(n_samples)
for index in range(n_samples):
supports_correct = supports[index][idx_correct_label[index]]
// removing index of the correct class
difference = supports_correct - supports[index, :]
difference = np.delete(difference, idx_correct_label[index])
C_src[index] = np.sort(difference)[0]
return C_src
def softmax(w, theta=1.0):
After Change
// Get supports for the correct class
supports_correct = supports[mask]
// Get supports for the other classes
supports_others = supports[~mask]
difference = supports_correct.reshape(-1, 1) - supports_others.reshape(supports_correct.size, -1)
C_src = np.sort(difference, axis=1)[:, 0]
return C_src
def softmax(w, theta=1.0):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: scikit-learn-contrib/DESlib
Commit Name: cd000fd96342d660c4f7d2d21eab9888fbab3526
Time: 2018-04-23
Author: rafaelmenelau@gmail.com
File Name: deslib/util/prob_functions.py
Class Name:
Method Name: min_difference
Project Name: HyperGAN/HyperGAN
Commit Name: c7320c3b31fb300e6bab95b5a2e29212f332f2db
Time: 2018-08-20
Author: mikkel@255bits.com
File Name: hypergan/samplers/batch_walk_sampler.py
Class Name: BatchWalkSampler
Method Name: sample
Project Name: tensorflow/models
Commit Name: 64710c051f26a2778c03fc15ef29c4bcae01df32
Time: 2018-08-22
Author: reedwm@google.com
File Name: official/recommendation/ncf_main.py
Class Name:
Method Name: evaluate_model
Project Name: tensorflow/agents
Commit Name: 150442111a9db973dcce7d20fb0cf386cebf60b0
Time: 2019-12-11
Author: ebrevdo@google.com
File Name: tf_agents/agents/ddpg/actor_network.py
Class Name: ActorNetwork
Method Name: call