Graph not displayed in jupyter notebook and there is an issue:
'TreeEnsemble' object has no attribute 'values'
there is no such error in vs code
Code:
import shapimport pandas as pdfrom sklearn.model_selection import train_test_splitfrom catboost import CatBoostClassifierdata = pd.read_csv('D:/train_for_an.csv')X = data.drop('Survived', axis=1)y = data['Survived']X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)model = CatBoostClassifier(iterations=7, learning_rate=0.1, depth=3)model.fit(X_train, y_train)score = model.score(X_test, y_test)shap.initjs()explainer = shap.TreeExplainer(model, data = X)shap_values = explainer.shap_values(X_train)I was expecting to see a graph, but in Visual Studio Code the error
'TreeEnsemble' object has no attribute 'values'
is not present