class_docstr: Calculate model-level variable profiles as Partial or Accumulated Dependence
  
  - Partial Dependence Profile (average across Ceteris Paribus Profiles),
  - Individual Conditional Expectation (local weighted average across CP Profiles),
  - Accumulated Local Effects (cumulated average local changes in CP Profiles).
  
  Parameters
  -----------
  type : {'partial', 'accumulated', 'conditional'}
      Type of model profiles
      (default is `'partial'` for Partial Dependence Profiles).
  variables : str or array_like of str, optional
      Variables for which the profiles will be calculated
      (default is `None`, which means all of the variables).
  variable_type : {'numerical', 'categorical'}
      Calculate the profiles for numerical or categorical variables
      (default is `'numerical'`).
  groups : str or array_like of str, optional
      Names of categorical variables that will be used for profile grouping
      (default is `None`, which means no grouping).
  span : float, optional
      Smoothing coefficient used as sd for gaussian kernel (default is `0.25`).
  center : bool, optional
      Theoretically Accumulated Profiles start at `0`, but are centered to compare
      them with Partial Dependence Profiles (default is `True`, which means center
      around the average y_hat calculated on the data sample).
  random_state : int, optional
      Set seed for random number generator (default is random seed).
  
  Attributes
  -----------
  result : pd.DataFrame
      Main result attribute of an explanation.
  mean_prediction : float
      Average prediction for sampled `data` (using `N`).
  raw_profiles : pd.DataFrame or None
      Saved CeterisParibus object.
      NOTE: `None` if more objects were passed to the `fit` method.
  type : {'partial', 'accumulated', 'conditional'}
      Type of model profiles.
  variables : array_like of str or None
      Variables for which the profiles will be calculated
  variable_type : {'numerical', 'categorical'}
      Calculate the profiles for numerical or categorical variables.
  groups : str or array_like of str or None
      Names of categorical variables that will be used for profile grouping.
  span : float
      Smoothing coefficient used as sd for gaussian kernel.
  center : bool
      Theoretically Accumulated Profiles start at `0`, but are centered to compare
      them with Partial Dependence Profiles (default is `True`, which means center
      around the average y_hat calculated on the data sample).
  random_state : int or None
      Set seed for random number generator.
  
  Notes
  --------
  - https://pbiecek.github.io/ema/partialDependenceProfiles.html
  - https://pbiecek.github.io/ema/accumulatedLocalProfiles.html
class_docstr_tok: ["Calculate","model-level","variable","profiles","as","Partial","or","Accumulated","Dependence","-","Partial","Dependence","Profile","(","average","across","Ceteris","Paribus","Profiles",")",",","-","Individual","Conditional","Expectation","(","local","weighted","average","across","CP","Profiles",")",",","-","Accumulated","Local","Effects","(","cumulated","average","local","changes","in","CP","Profiles",")",".","Parameters","--","--","--","--","--","-","type",":","{","'partial","'",",","'accumulated","'",",","'conditional","'","}","Type","of","model","profiles","(","default","is","`","'partial","'","`","for","Partial","Dependence","Profiles",")",".","variables",":","str","or","array_like","of","str",",","optional","Variables","for","which","the","profiles","will","be","calculated","(","default","is","`","None","`",",","which","means","all","of","the","variables",")",".","variable_type",":","{","'numerical","'",",","'categorical","'","}","Calculate","the","profiles","for","numerical","or","categorical","variables","(","default","is","`","'numerical","'","`",")",".","groups",":","str","or","array_like","of","str",",","optional","Names","of","categorical","variables","that","will","be","used","for","profile","grouping","(","default","is","`","None","`",",","which","means","no","grouping",")",".","span",":","float",",","optional","Smoothing","coefficient","used","as","sd","for","gaussian","kernel","(","default","is","`","0.25","`",")",".","center",":","bool",",","optional","Theoretically","Accumulated","Profiles","start","at","`","0","`",",","but","are","centered","to","compare","them","with","Partial","Dependence","Profiles","(","default","is","`","True","`",",","which","means","center","around","the","average","y_hat","calculated","on","the","data","sample",")",".","random_state",":","int",",","optional","Set","seed","for","random","number","generator","(","default","is","random","seed",")",".","Attributes","--","--","--","--","--","-","result",":","pd.DataFrame","Main","result","attribute","of","an","explanation",".","mean_prediction",":","float","Average","prediction","for","sampled","`","data","`","(","using","`","N","`",")",".","raw_profiles",":","pd.DataFrame","or","None","Saved","CeterisParibus","object",".","NOTE",":","`","None","`","if","more","objects","were","passed","to","the","`","fit","`","method",".","type",":","{","'partial","'",",","'accumulated","'",",","'conditional","'","}","Type","of","model","profiles",".","variables",":","array_like","of","str","or","None","Variables","for","which","the","profiles","will","be","calculated","variable_type",":","{","'numerical","'",",","'categorical","'","}","Calculate","the","profiles","for","numerical","or","categorical","variables",".","groups",":","str","or","array_like","of","str","or","None","Names","of","categorical","variables","that","will","be","used","for","profile","grouping",".","span",":","float","Smoothing","coefficient","used","as","sd","for","gaussian","kernel",".","center",":","bool","Theoretically","Accumulated","Profiles","start","at","`","0","`",",","but","are","centered","to","compare","them","with","Partial","Dependence","Profiles","(","default","is","`","True","`",",","which","means","center","around","the","average","y_hat","calculated","on","the","data","sample",")",".","random_state",":","int","or","None","Set","seed","for","random","number","generator",".","Notes","--","--","--","--","-","https",":","\/\/pbiecek.github.io\/ema\/partialDependenceProfiles.html","-","https",":","\/\/pbiecek.github.io\/ema\/accumulatedLocalProfiles.html"]
code: def __init__(
      self,
      type="partial",
      variables=None,
      variable_type="numerical",
      groups=None,
      span=0.25,
      center=True,
      random_state=None,
  ):
      checks.check_variable_type(variable_type)
      _variables = checks.check_variables(variables)
      _groups = checks.check_groups(groups)
  
      self.variable_type = variable_type
      self.groups = _groups
      self.type = type
      self.variables = _variables
      self.span = span
      self.center = center
      self.result = pd.DataFrame()
      self.mean_prediction = None
      self.raw_profiles = None
      self.random_state = random_state
  
file_path: DALEX/python/dalex/dalex/model_explanations/_aggregated_profiles/object.py
imports: import numpy
  import pandas
  import plotly.express
  from copy import deepcopy
  from .None import checks, utils
  from ...None import _theme, _global_checks, _global_utils
  from ..._explanation import Explanation
label_desc: Use image node_id 1 to create a new AggregatedProfiles object from inherited base classes: Explanation with example: obj = AggregatedProfiles(type, variables, variable_type, groups, span, center, random_state)