qxmt.visualization.plot_classification_performance module

qxmt.visualization.plot_classification_performance module#

qxmt.visualization.plot_classification_performance.plot_2d_predicted_result(X, y_true, y_pred, feature_cols=None, axis=[0, 1], title='"Groud Truth" VS "Predicted"', truth_label='Ground Truth', pred_label='Predicted', colors=None, class_labels=None, save_path=None, **kwargs)

Plot predicted result on 2D plane.

Parameters:
  • X (np.ndarray) – feature values.

  • y_true (np.ndarray) – ground truth labels.

  • y_pred (np.ndarray) – predicted labels.

  • feature_cols (Optional[list[str]], optional) – feature column names. Defaults to None.

  • axis (list[int], optional) – axis to plot (target feature col index). Defaults to [0, 1].

  • title (str, optional) – title of the plot. Defaults to ‘“Groud Truth” VS “Predicted”’.

  • truth_label (str, optional) – label of ground truth. Defaults to “Ground Truth”.

  • pred_label (str, optional) – label of predicted. Defaults to “Predicted”.

  • colors (Optional[dict[int, tuple[float, float, float]]], optional) – color of each class. Defaults to None.

  • class_labels (Optional[dict[int, str]], optional) – label of each class. Defaults to None.

  • save_path (Optional[str | Path], optional) – save path of graph. Defaults to None.

  • **kwargs (Any) – additional arguments for scatter plot.

Return type:

None