code: def plot_regressions(
      ytrue,
      ypred,
      samples=None,
      ids=None,
      labels=None,
      sizes=None,
      classes=None,
      gt_field=None,
      pred_field=None,
      best_fit_label=None,
      marker_size=None,
      cmap=None,
      title=None,
      ax=None,
      figsize=None,
      style=None,
      **kwargs,
  ):
      """Plots the given regression results.
  
      Args:
          ytrue: an array-like of ground truth values
          ypred: an array-like of predicted values
          samples (None): the :class:`fiftyone.core.collections.SampleCollection`
              whose data is being visualized
          ids (None): an array-like of sample or frame IDs corresponding to the
              regressions. If not provided but ``samples`` are provided, the
              appropriate IDs will be extracted from the samples
          labels (None): data to use to color the points. Can be any of the
              following:
  
              -   the name of a sample field or ``embedded.field.name`` of
                  ``samples`` from which to extract numeric or string values
              -   a :class:`fiftyone.core.expressions.ViewExpression` defining
                  numeric or string values to compute from ``samples`` via
                  :meth:`fiftyone.core.collections.SampleCollection.values`
              -   an array-like of numeric or string values
              -   a list of array-lies of numeric or string values, if
                  ``link_field`` refers to frames
          sizes (None): data to use to scale the sizes of the points. Can be any
              of the following:
  
              -   the name of a sample field or ``embedded.field.name`` of
                  ``samples`` from which to extract numeric values
              -   a :class:`fiftyone.core.expressions.ViewExpression` defining
                  numeric values to compute from ``samples`` via
                  :meth:`fiftyone.core.collections.SampleCollection.values`
              -   an array-like of numeric values
              -   a list of array-likes of numeric or string values, if
                  ``link_field`` refers to frames
          classes (None): a list of classes whose points to plot. Only applicable
              when ``labels`` contains strings
          gt_field (None): the name of the ground truth field
          pred_field (None): the name of the predictions field
          best_fit_label (None): a custom legend label for the best fit line
          marker_size (None): the marker size to use. If ``sizes`` are provided,
              this value is used as a reference to scale the sizes of all points
          cmap (None): a colormap recognized by ``matplotlib``
          title (None): a title for the plot
          ax (None): a matplotlib axis to plot in
          figsize (None): a ``(width, height)`` for the figure, in inches
          style (None): a style to use for the plot
          **kwargs: optional keyword arguments for matplotlib's ``scatter()``
  
      Returns:
          a matplotlib figure
      """
      if (
          samples is not None
          and gt_field is not None
          and samples._is_frame_field(gt_field)
      ):
          link_field = "frames"
      else:
          link_field = None
  
      points = np.stack([ytrue, ypred], axis=-1)
  
      points, ids, labels, sizes, _, _, _ = parse_scatter_inputs(
          points,
          samples=samples,
          ids=ids,
          link_field=link_field,
          labels=labels,
          sizes=sizes,
          classes=classes,
      )
  
      xline, yline, best_fit_label = best_fit_line(
          points, label=best_fit_label
      )
  
      xlabel = gt_field if gt_field is not None else "Ground truth"
      ylabel = pred_field if pred_field is not None else "Predictions"
  
      if style is None:
          style = _DEFAULT_STYLE
  
      if ax is None:
          _, ax = plt.subplots()
  
      with plt.style.context(style):
          ax.plot(xline, yline, color="k", label=best_fit_label)
          ax.set(xlabel=xlabel, ylabel=ylabel)
          ax.legend()
          ax.axis("equal")
  
      return scatterplot(
          points,
          samples=samples,
          ids=ids,
          link_field=link_field,
          labels=labels,
          sizes=sizes,
          marker_size=marker_size,
          cmap=cmap,
          title=title,
          ax=ax,
          ax_equal=True,
          figsize=figsize,
          style=style,
          **kwargs,
      )
  
imports: import itertools
  import logging
  import numpy
  import matplotlib
  from matplotlib.widgets import Button, LassoSelector
  from matplotlib.path import Path
  import matplotlib.pyplot
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  from mpl_toolkits.axes_grid1.inset_locator import InsetPosition
  from mpl_toolkits.mplot3d import Axes3D
  import sklearn.metrics.pairwise
  import sklearn.metrics
  import eta.core.utils
  import fiftyone.core.context
  import fiftyone.core.utils
  from .base import InteractivePlot
  from .utils import best_fit_line, load_button_icon, parse_lines_inputs, parse_locations, parse_scatter_inputs
label_desc: Use image node_id 2 for calling a global function with example usage: plot_regressions(ytrue, ypred, samples, ids, labels, sizes, classes, gt_field, pred_field, best_fit_label, marker_size, cmap, title, ax, figsize, style) and returns: scatterplot