class_docstr: The QQ plot compares the quantiles of the empirical residuals to the theoretical quantiles of a standard normal distribution $N(0, 1)$.
  Assuming that $Y=f(X)+\epsilon$ we can verify with this plot that $\epsilon ~ N(\mu, \sigma^2)$.
  If the error terms actually originate from a normal distribution, then the data points will scatter just slightly
  around the red straight line.
class_docstr_tok: ["The","QQ","plot","compares","the","quantiles","of","the","empirical","residuals","to","the","theoretical","quantiles","of","a","standard","normal","distribution","$","N","(","0",",","1",")","$",".","Assuming","that","$","Y=f","(","X",")","+\\epsilon","$","we","can","verify","with","this","plot","that","$","\\epsilon","~","N","(","\\mu",",","\\sigma^2",")","$",".","If","the","error","terms","actually","originate","from","a","normal","distribution",",","then","the","data","points","will","scatter","just","slightly","around","the","red","straight","line","."]
docstr: Calculate the theoretical quantiles and the ordered response.
  
  Parameters
  ----------
  standardized_residuals: np.array
      the standardized residuals of a model for some specific dataset
  
  Returns
  -------
      (osm, osr) tuple of nd.arrays
          Tuple of theoretical quantiles (osm, or order statistic medians) and ordered responses (osr). osr is
          simply the sorted standardized residuals.
  
      (slope, intercept) tuple of floats
          Tuple containing the result of the least-squares fit.
docstr_tok: ["Calculate","the","theoretical","quantiles","and","the","ordered","response",".","Parameters","--","--","--","--","--","standardized_residuals",":","np.array","the","standardized","residuals","of","a","model","for","some","specific","dataset","Returns","--","--","--","-","(","osm",",","osr",")","tuple","of","nd.arrays","Tuple","of","theoretical","quantiles","(","osm",",","or","order","statistic","medians",")","and","ordered","responses","(","osr",")",".","osr","is","simply","the","sorted","standardized","residuals",".","(","slope",",","intercept",")","tuple","of","floats","Tuple","containing","the","result","of","the","least-squares","fit","."]
code: def __get_qq(standardized_residuals: np.ndarray) -> np.ndarray:
      """
      Calculate the theoretical quantiles and the ordered response.
  
      Parameters
      ----------
      standardized_residuals: np.array
          the standardized residuals of a model for some specific dataset
  
      Returns
      -------
          (osm, osr) tuple of nd.arrays
              Tuple of theoretical quantiles (osm, or order statistic medians) and ordered responses (osr). osr is
              simply the sorted standardized residuals.
  
          (slope, intercept) tuple of floats
              Tuple containing the result of the least-squares fit.
  
      """
  
      qq = stats.probplot(
          standardized_residuals, dist="norm", sparams=(1)
      )
      return qq[0], qq[1][:2]
  
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 2 for calling the QQPlotWidget obj's underlying member method code with example usage: obj.__get_qq(standardized_residuals) and returns: qq,  qq