class_docstr: Manager for generating causal analyses from a dataset.
class_docstr_tok: ["Manager","for","generating","causal","analyses","from","a","dataset","."]
docstr: Computes the causal effects by running the causal
  configuration.
docstr_tok: ["Computes","the","causal","effects","by","running","the","causal","configuration","."]
code: def compute(self):
      """Computes the causal effects by running the causal
      configuration."""
      print("Causal Effects")
      print("Current Status: Generating Causal Effects.")
      is_classification = self._task_type == ModelTask.CLASSIFICATION
      for result in self._results:
          causal_config = result.config
          if not result.is_computed:
              analysis = CausalAnalysis(
                  causal_config.treatment_features,
                  self._categorical_features,
                  heterogeneity_inds=causal_config.heterogeneity_features,
                  classification=is_classification,
                  nuisance_models=causal_config.nuisance_model,
                  heterogeneity_model=causal_config.heterogeneity_model,
                  upper_bound_on_cat_expansion=causal_config.upper_bound_on_cat_expansion,
                  skip_cat_limit_checks=causal_config.skip_cat_limit_checks,
                  n_jobs=causal_config.n_jobs,
                  categories=causal_config.categories,
                  verbose=causal_config.verbose,
                  random_state=causal_config.random_state,
              )
  
              X_train = self._train.drop([self._target_column], axis=1)
              X_test = self._test.drop([self._target_column], axis=1)
              y_train = self._train[self._target_column].values.ravel()
  
              self._fit_causal_analysis(
                  analysis,
                  X_train,
                  y_train,
                  causal_config.upper_bound_on_cat_expansion,
              )
              result.causal_analysis = analysis
  
              result.global_effects = analysis.global_causal_effect(
                  alpha=causal_config.alpha, keep_all_levels=True
              )
              result.local_effects = analysis.local_causal_effect(
                  X_test,
                  alpha=causal_config.alpha,
                  keep_all_levels=True,
              )
  
              result.policies = []
              for i in range(len(causal_config.treatment_features)):
                  policy = self._create_policy(
                      result,
                      X_test,
                      causal_config.treatment_features[i],
                      causal_config.treatment_cost[i],
                      causal_config.alpha,
                      causal_config.max_tree_depth,
                      causal_config.min_tree_leaf_samples,
                  )
                  result.policies.append(policy)
  
              result._validate_schema()
      print("Current Status: Finished generating causal effects.")
  
imports: from pathlib import Path
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from econml.solutions.causal_analysis import CausalAnalysis
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai._data_validations import validate_train_test_categories
  from responsibleai._internal.constants import CausalManagerKeys, ListProperties, ManagerNames
  from responsibleai._tools.causal.causal_config import CausalConfig
  from responsibleai._tools.causal.causal_constants import DefaultParams, ModelTypes
  from responsibleai._tools.causal.causal_result import CausalResult
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.feature_metadata import FeatureMetadata
  from responsibleai.managers.base_manager import BaseManager
  from responsibleai.utils import _find_features_having_missing_values, _measure_time
label_desc: Use image node_id 9 for calling the CausalManager obj's underlying member method code with example usage: obj.compute() without return types