Example #1
0
def get_f1(y_true: nd.ndarray.NDArray, y_pred: nd.ndarray.NDArray):
    return f1_score(y_true.asnumpy().astype(np.int),
                    y_pred.asnumpy().astype(np.int),
                    average="weighted")
Example #2
0
def get_acc(y_true: nd.ndarray.NDArray, y_pred: nd.ndarray.NDArray):
    return accuracy_score(y_true.asnumpy().astype(np.int),
                          y_pred.asnumpy().astype(np.int))