Slide 47
Slide 47 text
Copyright © 2023, Oracle and/or its affiliates. All rights reserved.
47
Changing explainers
To change and retrain the explainer for either the model or predictions or both, use
ML_EXPLAIN() and provide the following parameters:
• The same training data used to create the model (ml_iris.train)
• The model’s label/target column (class)
• A JSON_OBJECT to specify the model and prediction explainers to be used
• Explainer specific options can also be added to this object – read the docs
Review the outcome by querying the model catalog
Checking the model for accuracy
mysql> CALL sys.ML_EXPLAIN('ml_iris.train', 'class', @iris_model, JSON_OBJECT('model_explainer',
'shap', 'prediction_explainer', 'permutation_importance'));
Query OK, 0 rows affected (8.6091 sec)
mysql> SELECT model_explanation FROM ML_SCHEMA_freshdaz.MODEL_CATALOG WHERE model_handle=@iris_model\G
*************************** 1. row ***************************
model_explanation: {"shap": {"petal width": 0.358, "sepal width": 0.0, "petal length": 0.2815, "sepal
length": 0.0}, "permutation_importance": {"petal width": 0.478, "sepal width": 0.0, "petal length":
0.3338, "sepal length": 0.0}}
1 row in set (0.0006 sec)