sharkpy.plotting ================ .. py:module:: sharkpy.plotting Attributes ---------- .. autoapisummary:: sharkpy.plotting.available_fonts sharkpy.plotting.SHARKPY_COLORS Functions --------- .. autoapisummary:: sharkpy.plotting.validate_colors sharkpy.plotting.plot_model sharkpy.plotting._plot_prediction sharkpy.plotting._plot_residuals sharkpy.plotting._plot_confusion_matrix sharkpy.plotting._plot_roc sharkpy.plotting._plot_pr_curve sharkpy.plotting._plot_proba_hist sharkpy.plotting._plot_feature_importance sharkpy.plotting.get_sharkpy_colors Module Contents --------------- .. py:data:: available_fonts .. py:data:: SHARKPY_COLORS .. py:function:: validate_colors(colors: Dict[str, str]) -> Dict[str, str] Validate color dictionary and fall back to defaults if invalid. :param colors: Dictionary of color specifications :returns: Validated color dictionary .. py:function:: plot_model(model, X, y=None, kind='prediction', show=True, save_path=None, feature_names=None, colors: Optional[Dict[str, str]] = None) Visualizes model behavior depending on the specified kind. :param model: trained model :param X: array-like, shape (n_samples, n_features) :param y: array-like, shape (n_samples,), optional :param kind: str, one of {"prediction", "residuals", "confusion_matrix", "roc", "pr_curve", "proba_hist", "feature_importance"} :param show: bool, whether to display the plot :param save_path: str or None, path to save the plot :param feature_names: list, optional, names of features for plotting :param colors: dict, optional, custom color specifications .. py:function:: _plot_prediction(model, X, y, colors) .. py:function:: _plot_residuals(model, X, y, colors) .. py:function:: _plot_confusion_matrix(model, X, y, colors) .. py:function:: _plot_roc(model, X, y, colors) .. py:function:: _plot_pr_curve(model, X, y, colors) .. py:function:: _plot_proba_hist(model, X, y, colors) .. py:function:: _plot_feature_importance(model, feature_names, colors) .. py:function:: get_sharkpy_colors() -> Dict[str, str] Returns the default SharkPy color scheme. :returns: Dictionary of color specifications