class_docstr: Calculate predict-level variable profiles as Ceteris Paribus
  
  Parameters
  -----------
  variables : array_like of str, optional
      Variables for which the profiles will be calculated
      (default is `None`, which means all of the variables).
  grid_points : int, optional
      Maximum number of points for profile calculations (default is `101`).
      NOTE: The final number of points may be lower than `grid_points`,
      eg. if there is not enough unique values for a given variable.
  variable_splits : dict of lists, optional
      Split points for variables e.g. `{'x': [0, 0.2, 0.5, 0.8, 1], 'y': ['a', 'b']}`
      (default is `None`, which means that they will be calculated using one of
      `variable_splits_type` and the `data` attribute).
  variable_splits_type : {'uniform', 'quantiles'}, optional
      Way of calculating `variable_splits`. Set `'quantiles'` for percentiles.
      (default is `'uniform'`, which means uniform grid of points).
  variable_splits_with_obs: bool, optional
      Add variable values of `new_observation` data to the `variable_splits`
      (default is `True`).
  processes : int, optional
      Number of parallel processes to use in calculations. Iterated over `variables`
      (default is `1`, which means no parallel computation).
  
  Attributes
  -----------
  result : pd.DataFrame
      Main result attribute of an explanation.
  new_observation : pd.DataFrame
      Observations for which predictions need to be explained.
  variables : array_like of str or None
      Variables for which the profiles will be calculated.
  grid_points : int
      Maximum number of points for profile calculations.
  variable_splits : dict of lists or None
      Split points for variables.
  variable_splits_type : {'uniform', 'quantiles'}
      Way of calculating `variable_splits`.
  variable_splits_with_obs: bool
      Add variable values of `new_observation` data to the `variable_splits`.
  processes : int
      Number of parallel processes to use in calculations. Iterated over `B`.
  
  Notes
  --------
  - https://pbiecek.github.io/ema/ceterisParibus.html
docstr: Calculate the result of explanation
  
  Fit method makes calculations in place and changes the attributes.
  
  Parameters
  -----------
  explainer : Explainer object
      Model wrapper created using the Explainer class.
  new_observation : pd.DataFrame or np.ndarray
      Observations for which predictions need to be explained.
  y : pd.Series or np.ndarray (1d), optional
      Target variable with the same length as `new_observation`.
  verbose : bool, optional
      Print tqdm progress bar (default is `True`).
  
  Returns
  -----------
  None
docstr_tok: ["Calculate","the","result","of","explanation","Fit","method","makes","calculations","in","place","and","changes","the","attributes",".","Parameters","--","--","--","--","--","-","explainer",":","Explainer","object","Model","wrapper","created","using","the","Explainer","class",".","new_observation",":","pd.DataFrame","or","np.ndarray","Observations","for","which","predictions","need","to","be","explained",".","y",":","pd.Series","or","np.ndarray","(","1d",")",",","optional","Target","variable","with","the","same","length","as","`","new_observation","`",".","verbose",":","bool",",","optional","Print","tqdm","progress","bar","(","default","is","`","True","`",")",".","Returns","--","--","--","--","--","-","None"]
code: def fit(self, explainer, new_observation, y=None, verbose=True):
      """Calculate the result of explanation
  
      Fit method makes calculations in place and changes the attributes.
  
      Parameters
      -----------
      explainer : Explainer object
          Model wrapper created using the Explainer class.
      new_observation : pd.DataFrame or np.ndarray
          Observations for which predictions need to be explained.
      y : pd.Series or np.ndarray (1d), optional
          Target variable with the same length as `new_observation`.
      verbose : bool, optional
          Print tqdm progress bar (default is `True`).
  
      Returns
      -----------
      None
      """
  
      self.variables = checks.check_variables(
          self.variables, explainer, self.variable_splits
      )
  
      checks.check_data(explainer.data, self.variables)
  
      self.new_observation = checks.check_new_observation(
          new_observation, explainer
      )
  
      self.variable_splits = checks.check_variable_splits(
          self.variable_splits,
          self.variables,
          self.grid_points,
          explainer.data,
          self.variable_splits_type,
          self.variable_splits_with_obs,
          self.new_observation,
      )
  
      y = checks.check_y(y)
  
      (
          self.result,
          self.new_observation,
      ) = utils.calculate_ceteris_paribus(
          explainer,
          self.new_observation,
          self.variable_splits,
          y,
          self.processes,
          verbose,
      )
  
file_path: DALEX/python/dalex/dalex/predict_explanations/_ceteris_paribus/object.py
imports: import numpy
  import pandas
  import plotly.express
  import warnings
  from copy import deepcopy
  from .None import checks, plot, utils
  from ...None import _theme, _global_checks, _global_utils
  from ..._explanation import Explanation
label_desc: Use image node_id 3 for calling the CeterisParibus obj's underlying member method code with example usage: obj.fit(explainer, new_observation, y, verbose) without return types