class_docstr: Unit test Smart Predictor class
class_docstr_tok: ["Unit","test","Smart","Predictor","class"]
docstr: Unit test of predict_proba method.
docstr_tok: ["Unit","test","of","predict_proba","method","."]
code: def test_predict_proba_1(self):
      """
      Unit test of predict_proba method.
      """
      predictor_1 = self.predictor_1
  
      clf = cb.CatBoostRegressor(n_estimators=1).fit(
          self.df_encoded_1[["x1", "x2"]], self.df_1["y"]
      )
      backend = ShapBackend(model=clf)
      predictor_1.model = clf
      predictor_1.backend = backend
      predictor_1._case = "regression"
      predictor_1._classes = None
  
      with self.assertRaises(AttributeError):
          predictor_1.predict_proba()
  
      predictor_1 = self.predictor_1
  
      with self.assertRaises(AttributeError):
          predictor_1.predict_proba()
  
      predictor_1.data = {
          "x": None,
          "ypred": None,
          "contributions": None,
      }
  
      with self.assertRaises(KeyError):
          predictor_1.predict_proba()
  
imports: import unittest
  from shapash.explainer.smart_predictor import SmartPredictor
  from shapash import SmartExplainer
  from shapash.explainer.smart_state import SmartState
  from shapash.explainer.multi_decorator import MultiDecorator
  from shapash.backend import ShapBackend
  import os
  from os import path
  from pathlib import Path
  import pandas
  import numpy
  import catboost
  from catboost import Pool
  import category_encoders
  from unittest.mock import patch
  import types
  from sklearn.compose import ColumnTransformer
  import sklearn.preprocessing
  import shap
label_desc: Use image node_id 20 for calling the TestSmartPredictor obj's underlying member method code with example usage: obj.test_predict_proba_1() without return types