graphorge.gnn_base_model.predict.prediction_plots.plot_truth_vs_prediction

plot_truth_vs_prediction(prediction_sets, error_bound=None, is_r2_coefficient=False, is_direct_loss_estimator=False, is_normalize_data=False, filename='prediction_vs_groundtruth', save_dir=None, is_save_fig=False, is_stdout_display=False, is_latex=False)[source]

Plot ground-truth versus predictions.

Parameters:
  • prediction_sets (dict) – One or more prediction processes, where each process (key, str) is stored as a data array (item, numpy.ndarray(2d)) as follows: the i-th row is associated with i-th prediction point, data_array[i, 0] holds the ground-truth and data_array[i, 1] holds the prediction. Dictionary keys are taken as labels for the corresponding prediction processes.

  • error_bound (float, default=None) – Relative error between ground-truth and prediction that defines an symmetric error-based shaded area with respect to the identity line.

  • is_r2_coefficient (bool, default=False) – Plot coefficient of determination. Only effective if plotting a single prediction process.

  • is_direct_loss_estimator (bool, default=False) – Plot Direct Loss Estimator (DLE) based on Linear Regression model. Only effective if plotting a single prediction process.

  • is_normalize_data (bool, default=False) – Normalize predictions and ground-truth data to the range [0, 1] for each prediction process.

  • filename (str, default='prediction_vs_groundtruth') – Figure name.

  • save_dir (str, default=None) – Directory where figure is saved. If None, then figure is saved in current working directory.

  • is_save_fig (bool, default=False) – Save figure.

  • is_stdout_display (bool, default=False) – True if displaying figure to standard output device, False otherwise.

  • is_latex (bool, default=False) – If True, then render all strings in LaTeX. If LaTex is not available, then this option is silently set to False and all input strings are processed to remove $(…)$ enclosure.