class_docstr: To analyze the residuals of a given model, we are assuming that $Y=f(X)+\epsilon$ for some unknown
  regression function $f(X)$ we further assume that the error terms $\epsilon_i$ are i.i.d. random variables
  with $\epsilon_i~N(0,\sigma^2)$.
  More precisely we assume:
      1. Zero mean $E[e_i]=0$
      2. Constant variance $Var[e_i]=\sigma^2$
      3. A normal distribution $\epsilon_i~N(0,\sigma^2)$
      4. The error terms are independent
  
  To verify those four assumptions four interactive residual plots will be created.
  If those assumptions are not satisfied, the plausibility of the given model for the given data is to be questioned.
class_docstr_tok: ["To","analyze","the","residuals","of","a","given","model",",","we","are","assuming","that","$","Y=f","(","X",")","+\\epsilon","$","for","some","unknown","regression","function","$","f","(","X",")","$","we","further","assume","that","the","error","terms","$","\\epsilon_i","$","are","i.i.d",".","random","variables","with","$","\\epsilon_i~N","(","0",",","\\sigma^2",")","$",".","More","precisely","we","assume",":","1",".","Zero","mean","$","E","[","e_i","]","=0","$","2",".","Constant","variance","$","Var","[","e_i","]","=\\sigma^2","$","3",".","A","normal","distribution","$","\\epsilon_i~N","(","0",",","\\sigma^2",")","$","4",".","The","error","terms","are","independent","To","verify","those","four","assumptions","four","interactive","residual","plots","will","be","created",".","If","those","assumptions","are","not","satisfied",",","the","plausibility","of","the","given","model","for","the","given","data","is","to","be","questioned","."]
docstr: Instantiates the interactive residual plots for the given data
  
  Parameters
  ----------
  model
      describes the regression model which is to be evaluated
  x: np.ndarray
      the training data
  y: np.ndarray
      the training labels
  x_test: np.ndarray
      optional, some test data (requires y_test)
  y_test: np.ndarray
      optional, the labels to the provided test data (requires x_test)
  display: CommonDisplay
      this object is required to show the plots
docstr_tok: ["Instantiates","the","interactive","residual","plots","for","the","given","data","Parameters","--","--","--","--","--","model","describes","the","regression","model","which","is","to","be","evaluated","x",":","np.ndarray","the","training","data","y",":","np.ndarray","the","training","labels","x_test",":","np.ndarray","optional",",","some","test","data","(","requires","y_test",")","y_test",":","np.ndarray","optional",",","the","labels","to","the","provided","test","data","(","requires","x_test",")","display",":","CommonDisplay","this","object","is","required","to","show","the","plots"]
code: def __init__(
      self,
      model,
      x: np.ndarray,
      y: np.ndarray,
      x_test: np.ndarray = None,
      y_test: np.ndarray = None,
      display: Optional[CommonDisplay] = None,
  ):
      """
      Instantiates the interactive residual plots for the given data
  
      Parameters
      ----------
      model
          describes the regression model which is to be evaluated
      x: np.ndarray
          the training data
      y: np.ndarray
          the training labels
      x_test: np.ndarray
          optional, some test data (requires y_test)
      y_test: np.ndarray
          optional, the labels to the provided test data (requires x_test)
      display: CommonDisplay
          this object is required to show the plots
      """
  
      self.figures: List[BaseFigureWidget] = []
      self.display: CommonDisplay = display or CommonDisplay()
      if isinstance(
          self.display._general_display,
          (ColabBackend, DatabricksBackend),
      ):
          raise ValueError(
              "residuals_interactive plot is not supported on Google Colab or Databricks."
          )
      self.plot = self.__create_resplots(model, x, y, x_test, y_test)
  
imports: from typing import List, Optional
  import numpy
  import pandas
  import plotly.express
  import plotly.graph_objects
  from ipywidgets import Layout, widgets
  from plotly.basewidget import BaseFigureWidget
  from scipy import stats
  import pycaret.internal.plots.helper
  from pycaret.internal.display import CommonDisplay
  from pycaret.internal.display.display_backend import ColabBackend, DatabricksBackend
  from pycaret.internal.logging import get_logger
  from pycaret.internal.validation import fit_if_not_fitted
label_desc: Use image node_id 1 to create a new InteractiveResidualsPlot object  with example: obj = InteractiveResidualsPlot(model, x, y, x_test, y_test, display)