Пример #1
0
def show():
    results = datasets.np_load_data(RESULTS_FOLDER_PATH, "results.npy")
    for result in results:
        plot.plt_validation_curve(result[2], result[3], result[1], result[0],
                                  plot_tile="Validation curve for TOR/NonTor dataset with Decision Tree")

    result = datasets.pk_load(RESULTS_FOLDER_PATH, "learning_curves")
    plot.plt_learning_curve(result[0], result[1], result[2], "Learning curve for TOR/NonTor dataset with Decision Tree")
Пример #2
0
def show():
    results = datasets.np_load_data(RESULTS_FOLDER_PATH, "results.npy")
    for result in results:
        plot.plt_validation_curve(
            result[2],
            result[3],
            result[1],
            result[0],
            plot_tile=
            "Validation curve for CICAndMal2017 dataset with Random Forest")
Пример #3
0
def show(scor='roc_auc'):
    results = datasets.np_load_data(RESULTS_FOLDER_PATH, "results.npy")
    for result in results:
        plot.plt_validation_curve(
            result[2],
            result[3],
            result[1],
            result[0],
            plot_tile=
            "Validation curve for CICIDS2017 dataset with Linear Regression")
def show():
    for parameter_dir in os.listdir(RESULTS_FOLDER_PATH):
        result_dir = os.path.join(RESULTS_FOLDER_PATH, parameter_dir)
        if not os.path.isdir(result_dir):
            continue
        parameter_name = parameter_dir.replace("_", " ").capitalize()

        for file in os.listdir(result_dir):
            if file.endswith(".npy"):
                if "roc_fpr_tpr_thres" in file:
                    fpr_tpr_thres = datasets.np_load_data(result_dir, file)
                    plot.initialize_roc_plt(parameter_name)
                    for i in range(0, len(fpr_tpr_thres)):
                        plot.plt_add_roc_curve(fpr_tpr_thres[i][1],
                                               fpr_tpr_thres[i][2],
                                               fpr_tpr_thres[i][0])
                elif "roc_auc_scores" in file:
                    auc_score = datasets.np_load_data(result_dir, file)
                    plot.plot_auc_score(auc_score[:, 0], auc_score[:, 1],
                                        parameter_name)

    plot.show()