plot_fresh.py - cmikke97/Automatic-Malware-Signature-Generation GitHub Wiki
-
import json- json encoder and decoder - json documentation -
import os- provides a portable way of using operating system dependent functionality - os documentation -
import tempfile- used to create temporary files and directories - tempfile documentation
-
import baker- easy, powerful access to Python functions from the command line - baker documentation -
import matplotlib- comprehensive library for creating static, animated, and interactive visualizations in Python - matplotlib documentation -
import mlflow- open source platform for managing the end-to-end machine learning lifecycle - mlflow documentation -
import torch- tensor library like NumPy, with strong GPU support - pytorch documentation -
from numpy import interp- one-dimensional linear interpolation for monotonically increasing sample points - numpy.interp documentation -
from sklearn.metrics import auc- used to compute the Area Under the Curve (AUC) using the trapezoidal rule - sklearn.metrics.auc documentation -
from sklearn.metrics import confusion_matrix- used to compute the confusion matrix to evaluate the accuracy of a classification - sklearn.metrics.confusion_matrix documentation -
from sklearn.preprocessing import label_binarize- applies the boolean thresholding to an array-like matrix - sklearn.preprocessing.label_binarize documentation
from utils.plot_utils import *
plot_score_trend(values_dict, filename, key, style, std_alpha) (function) - Plot score trend given a dict of values as input.
-
values_dict(arg) - Dict containing the values of the score to plot -
filename(arg) - Path where to save the plot -
key(arg) - Name of the score -
style(arg) - Style to use in the plot -
std_alpha(arg) - Standard deviation alpha value (default: .2)
plot_confusion_matrix(cm, filename, n_anchors, families) (function) - Plot and save to file a figure containing the confusion matrix passed as input.
-
cm(arg) - Ndarray containing the confusion matrix to plot -
filename(arg) - Path where to save the generated confusion matrix plot -
n_anchors(arg) - Number of anchors used -
families(arg) - List of families of interest
compute_fresh_scores(predictions_json_path) (function) - Compute scores for the model when evaluated using the Fresh Dataset on the Family Prediction task.
-
predictions_json_path(arg) - Path where to find the json file containing the model predictions
plot_fresh_results(predictions_json_path) (function) - Plot 'micro' averaged, 'macro' averaged and per-family AUC score trends resulting from the evaluation of the model using the Fresh Dataset on the Family Prediction task.
-
predictions_json_path(arg) - Path where to find the json file containing the model predictions
compute_all_fresh_results(results_file) (function, baker command) - Compute model results on the family prediction task.
-
results_file(arg) - Path of the json file where to find the model results