code: def plot_regression_metrics(
      estimator, X_val, y_val, drop_outliers=False
  ):
      """Show classification metrics on a validation set.
  
      Parameters
      ----------
      estimator : sklearn or dabl estimator
          Trained estimator
      X_val : DataFrame
          Validation set features
      y_val : Series
          Validation set target.
      drop_outliers : boolean, default=False
          Whether to drop outliers in the predictions.
      """
      y_pred = estimator.predict(X_val)
      # residual plot
      if drop_outliers:
          inlier_mask = _find_inliers(pd.Series(y_pred))
          y_val = y_val[inlier_mask]
          y_pred = y_pred[inlier_mask]
      true_min = y_val.min()
      true_max = y_val.max()
      scatter_alpha = _get_scatter_alpha("auto", y_val)
      scatter_size = _get_scatter_size("auto", y_val)
      plt.plot(
          [true_min, true_max],
          [true_min, true_max],
          "--",
          label="Ideal",
      )
      plt.scatter(y_val, y_pred, alpha=scatter_alpha, s=scatter_size)
      plt.xlabel("Predictions")
      plt.ylabel("True target")
      plt.title("Observed vs predicted")
      plt.legend()
      ax = plt.gca()
      ax.set_aspect("equal")
  
file_path: dabl/dabl/explain.py
imports: import numpy
  import pandas
  from warnings import warn
  import matplotlib.pyplot
  from sklearn.tree import DecisionTreeClassifier, plot_tree
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.metrics import classification_report, confusion_matrix
  from sklearn.inspection import PartialDependenceDisplay
  from sklearn.feature_selection import f_classif
  from sklearn.impute import SimpleImputer
  from .models import SimpleClassifier, SimpleRegressor, AnyClassifier
  from .utils import _validate_Xyt
  from .plot.utils import plot_coefficients, plot_multiclass_roc_curve, find_pretty_grid, _make_subplots, _find_inliers, _get_scatter_alpha, _get_scatter_size
label_desc: Use image node_id 2 for calling a global function with example usage: plot_regression_metrics(estimator, X_val, y_val, drop_outliers) without return types