3ff8490274183fa06276bda8e774a806a508dd98,matchzoo/metrics/evaluations.py,,accuracy,#Any#Any#,88
Before Change
return np.mean(np.square(y_pred - y_true), axis=-1)
def accuracy(y_true, y_pred):
y_true = np.squeeze(y_true)
y_pred = np.squeeze(y_pred)
y_true_idx = np.argmax(y_true, axis = 1)
y_pred_idx = np.argmax(y_pred, axis = 1)
assert y_true_idx.shape == y_pred_idx.shape
After Change
return np.mean(np.square(y_pred - y_true), axis=-1)
def accuracy(y_true, y_pred):
y_true = _to_list(np.squeeze(y_true).tolist())
y_pred = _to_list(np.squeeze(y_pred).tolist())
y_true_idx = np.argmax(y_true, axis = 1)
y_pred_idx = np.argmax(y_pred, axis = 1)
assert y_true_idx.shape == y_pred_idx.shape
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: NTMC-Community/MatchZoo
Commit Name: 3ff8490274183fa06276bda8e774a806a508dd98
Time: 2017-11-14
Author: fanyixing111@hotmail.com
File Name: matchzoo/metrics/evaluations.py
Class Name:
Method Name: accuracy
Project Name: NTMC-Community/MatchZoo
Commit Name: 3ff8490274183fa06276bda8e774a806a508dd98
Time: 2017-11-14
Author: fanyixing111@hotmail.com
File Name: matchzoo/metrics/evaluations.py
Class Name:
Method Name: map
Project Name: NTMC-Community/MatchZoo
Commit Name: 3ff8490274183fa06276bda8e774a806a508dd98
Time: 2017-11-14
Author: fanyixing111@hotmail.com
File Name: matchzoo/metrics/evaluations.py
Class Name:
Method Name: mse