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], 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].

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

  • **kwargs (Any) – additional arguments for plot. truth_label (str, optional): label of ground truth. Defaults to “Ground Truth”. pred_label (str, optional): label of predicted. Defaults to “Predicted”. title (str, optional): title of the plot. Defaults to ‘“Groud Truth” VS “Predicted”’. colors (Optional[dict[int, str]], optional): color of each class. Defaults to None. class_labels (Optional[dict[int, str]], optional): label of each class. Defaults to None.

Return type:

None