def get_cv_accuracy(res):
    """
    Extract the cv accuracy from the model
    """
    ac_list = [(accuracy["train_acc_final"],
                accuracy["test_acc_final"]
                )
               for accuracy, weights in res]
    ac = np.array(ac_list)

    perf = {
        "mean_train_acc": np.mean(ac[:, 0]),
        "std_train_acc": np.std(ac[:, 0]),
        "mean_test_acc": np.mean(ac[:, 1]),
        "std_test_acc": np.std(ac[:, 1]),

    }
    return perf
def get_cv_accuracy ( res ) : ac_list = [ ( accuracy [ "train_acc_final" ] , accuracy [ "test_acc_final" ] ) for accuracy , weights in res ] ac = np . array ( ac_list ) perf = { "mean_train_acc" : np . mean ( ac [ : , 0 ] ) , "std_train_acc" : np . std ( ac [ : , 0 ] ) , "mean_test_acc" : np . mean ( ac [ : , 1 ] ) , "std_test_acc" : np . std ( ac [ : , 1 ] ) , } return perf
Extract the cv accuracy from the model