class_docstr: State pattern attached to SmartExplainer. This is the base class that only handles matrices
  of local contributions. The multi-class case is tackled in SmartMultiState.
class_docstr_tok: ["State","pattern","attached","to","SmartExplainer",".","This","is","the","base","class","that","only","handles","matrices","of","local","contributions",".","The","multi-class","case","is","tackled","in","SmartMultiState","."]
docstr: Check that contributions and prediction set match in terms of lines and columns.
  
  Parameters
  ----------
  contributions : pandas.DataFrame
      Local contributions to check.
  x_init : pandas.DataFrame
      Prediction set.
  features_names: bool (optional), defaut = True
      Boolean whether or not check if contributions and x_init have the same features names
  Returns
  -------
  Bool
      True if inputs share shape and index. False otherwise.
docstr_tok: ["Check","that","contributions","and","prediction","set","match","in","terms","of","lines","and","columns",".","Parameters","--","--","--","--","--","contributions",":","pandas.DataFrame","Local","contributions","to","check",".","x_init",":","pandas.DataFrame","Prediction","set",".","features_names",":","bool","(","optional",")",",","defaut","=","True","Boolean","whether","or","not","check","if","contributions","and","x_init","have","the","same","features","names","Returns","--","--","--","-","Bool","True","if","inputs","share","shape","and","index",".","False","otherwise","."]
code: def check_contributions(
      self, contributions, x_init, features_names=True
  ):
      """
      Check that contributions and prediction set match in terms of lines and columns.
  
      Parameters
      ----------
      contributions : pandas.DataFrame
          Local contributions to check.
      x_init : pandas.DataFrame
          Prediction set.
      features_names: bool (optional), defaut = True
          Boolean whether or not check if contributions and x_init have the same features names
      Returns
      -------
      Bool
          True if inputs share shape and index. False otherwise.
      """
      if x_init.shape != contributions.shape:
          return False
      if not x_init.index.equals(contributions.index):
          return False
      if features_names:
          if not x_init.columns.equals(contributions.columns):
              return False
      else:
          if not len(x_init.columns) == len(contributions.columns):
              return False
      return True
  
imports: import numpy
  import pandas
  from shapash.decomposition.contributions import inverse_transform_contributions
  from shapash.decomposition.contributions import rank_contributions, assign_contributions
  from shapash.manipulation.filters import hide_contributions
  from shapash.manipulation.filters import cap_contributions
  from shapash.manipulation.filters import sign_contributions
  from shapash.manipulation.filters import cutoff_contributions
  from shapash.manipulation.filters import combine_masks
  from shapash.manipulation.mask import compute_masked_contributions
  from shapash.manipulation.mask import init_mask
  from shapash.manipulation.summarize import summarize, compute_features_import, group_contributions
label_desc: Use image node_id 3 for calling the SmartState obj's underlying member method code with example usage: obj.check_contributions(contributions, x_init, features_names) and returns: True, False, False, False, False