Skip to content

Commit c640625

Browse files
committed
Adding documentation and versioning info
1 parent 11af78b commit c640625

File tree

6 files changed

+123
-1
lines changed

6 files changed

+123
-1
lines changed

HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
History
44
-------
55

6+
9.6.0 (2023-07-20)
7+
------------------
8+
9+
- Adding ShapWrapper to enable local Shap values computation with the Shap
10+
library.
11+
- Adding Evaluation object.
12+
- Improving Field class to allow field values encoding as numpy arrays.
13+
614
9.5.0 (2023-06-16)
715
------------------
816

bigml/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '9.5.0'
1+
__version__ = '9.6.0'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"code": 200, "resource": "evaluation/64b5b07f79c6023e9583c16f", "location": "https://bigml.io/andromeda/evaluation/64b5b07f79c6023e9583c16f", "object": {"boosted_ensemble": false, "category": 0, "code": 200, "combiner": null, "configuration": null, "configuration_status": false, "created": "2023-07-17T21:19:59.247000", "creator": "mmartin", "dataset": "dataset/64b5b07a79c602298f37d884", "dataset_status": true, "datasets": [], "deepnet": "", "description": "", "ensemble": "", "evaluations": null, "excluded_fields": [], "fields_map": {"000001": "000001", "000003": "000003", "000004": "000004", "000005": "000005", "000006": "000006", "000007": "000007", "000009": "000009", "00000a": "00000a", "00000c": "00000c", "00000d": "00000d", "000010": "000010", "000011": "000011", "000012": "000012", "000013": "000013"}, "fusion": "", "input_fields": [], "linearregression": "", "locale": "en-US", "logisticregression": "", "max_rows": 134, "missing_strategy": 0, "model": "model/64b5b05079c602298f37d881", "model_status": true, "model_type": 0, "name": "Stdin input vs. Stdin input", "name_options": "512-node, pruned, deterministic order, operating kind=probability", "number_of_models": 1, "objective_field_descriptors": {"000013": {"column_number": 19, "datatype": "string", "name": "Churn", "optype": "categorical", "order": 19, "preferred": true, "term_analysis": {"enabled": true}}}, "objective_fields": ["000013"], "objective_fields_names": ["Churn"], "operating_kind": "probability", "optiml": null, "optiml_status": false, "out_of_bag": false, "performance": 0.81925, "private": true, "project": null, "range": null, "replacement": false, "resource": "evaluation/64b5b07f79c6023e9583c16f", "result": {"class_names": ["False", "True"], "mode": {"accuracy": 0.85075, "average_area_under_pr_curve": 0, "average_area_under_roc_curve": 0, "average_balanced_accuracy": 0.5, "average_f_measure": 0.45968, "average_kendalls_tau_b": 0, "average_ks_statistic": 0, "average_max_phi": 0, "average_phi": 0, "average_precision": 0.42537, "average_recall": 0.5, "average_spearmans_rho": 0, "confusion_matrix": [[114, 0], [20, 0]], "per_class_statistics": [{"accuracy": 0.85075, "balanced_accuracy": 0.5, "class_name": "False", "f_measure": 0.91935, "phi_coefficient": 0, "precision": 0.85075, "present_in_test_data": true, "recall": 1}, {"accuracy": 0.85075, "balanced_accuracy": 0.5, "class_name": "True", "f_measure": 0, "phi_coefficient": 0, "precision": 0, "present_in_test_data": true, "recall": 0}]}, "model": {"accuracy": 0.91791, "average_area_under_pr_curve": 0.90567, "average_area_under_roc_curve": 0.92588, "average_balanced_accuracy": 0.78684, "average_f_measure": 0.81925, "average_kendalls_tau_b": 0.46897, "average_ks_statistic": 0.76491, "average_max_phi": 0.76491, "average_phi": 0.64837, "average_precision": 0.86639, "average_recall": 0.78684, "average_spearmans_rho": 0.5368, "confusion_matrix": [[111, 3], [8, 12]], "per_class_statistics": [{"accuracy": 0.91791, "area_under_pr_curve": 0.9843, "area_under_roc_curve": 0.92588, "balanced_accuracy": 0.78684, "class_name": "False", "f_measure": 0.95279, "gain_curve": [[0, 0, 0.99933], [0.3209, 0.37719, 0.99838], [0.5, 0.57895, 0.99531], [0.52985, 0.60526, 0.99497], [0.6194, 0.71053, 0.99437], [0.67164, 0.76316, 0.99218], [0.69403, 0.78947, 0.98995], [0.79851, 0.90351, 0.98721], [0.81343, 0.92105, 0.98593], [0.82836, 0.9386, 0.98437], [0.85075, 0.96491, 0.97655], [0.85821, 0.96491, 0.9531], [0.87313, 0.96491, 0.92964], [0.88806, 0.97368, 0.42964], [0.89552, 0.98246, 0.28643], [0.91045, 1, 0.17186], [0.91791, 1, 0.14321], [0.92537, 1, 0.09548], [0.93284, 1, 0.06138], [0.96269, 1, 0.04296], [1, 1, null]], "kendalls_tau_b": 0.46897, "ks_statistic": [0.76491, 0.97655], "lift_curve": [[0, 0, 0.99933], [0.3209, 1.17544, 0.99838], [0.5, 1.15789, 0.99531], [0.52985, 1.14233, 0.99497], [0.6194, 1.14711, 0.99437], [0.67164, 1.13626, 0.99218], [0.69403, 1.13752, 0.98995], [0.79851, 1.1315, 0.98721], [0.81343, 1.1323, 0.98593], [0.82836, 1.13308, 0.98437], [0.85075, 1.1342, 0.97655], [0.85821, 1.12433, 0.9531], [0.87313, 1.10511, 0.92964], [0.88806, 1.09642, 0.42964], [0.89552, 1.09708, 0.28643], [0.91045, 1.09836, 0.17186], [0.91791, 1.08943, 0.14321], [0.92537, 1.08065, 0.09548], [0.93284, 1.072, 0.06138], [0.96269, 1.03876, 0.04296], [1, 1, null]], "max_phi": [0.76491, 0.97655], "negative_cdf": [[0, 0, 0.99933], [0.3209, 0, 0.99838], [0.5, 0.05, 0.99531], [0.52985, 0.1, 0.99497], [0.6194, 0.1, 0.99437], [0.67164, 0.15, 0.99218], [0.69403, 0.15, 0.98995], [0.79851, 0.2, 0.98721], [0.81343, 0.2, 0.98593], [0.82836, 0.2, 0.98437], [0.85075, 0.2, 0.97655], [0.85821, 0.25, 0.9531], [0.87313, 0.35, 0.92964], [0.88806, 0.4, 0.42964], [0.89552, 0.4, 0.28643], [0.91045, 0.4, 0.17186], [0.91791, 0.45, 0.14321], [0.92537, 0.5, 0.09548], [0.93284, 0.55, 0.06138], [0.96269, 0.75, 0.04296], [1, 1, null]], "per_threshold_confusion_matrices": [[[114, 20, 0, 0], null], [[114, 15, 5, 0], 0.04296], [[114, 11, 9, 0], 0.06138], [[114, 10, 10, 0], 0.09548], [[114, 9, 11, 0], 0.14321], [[114, 8, 12, 0], 0.17186], [[112, 8, 12, 2], 0.28643], [[111, 8, 12, 3], 0.42964], [[110, 7, 13, 4], 0.92964], [[110, 5, 15, 4], 0.9531], [[110, 4, 16, 4], 0.97655], [[107, 4, 16, 7], 0.98437], [[105, 4, 16, 9], 0.98593], [[103, 4, 16, 11], 0.98721], [[90, 3, 17, 24], 0.98995], [[87, 3, 17, 27], 0.99218], [[81, 2, 18, 33], 0.99437], [[69, 2, 18, 45], 0.99497], [[66, 1, 19, 48], 0.99531], [[43, 0, 20, 71], 0.99838], [[0, 0, 20, 114], 0.99933]], "phi_coefficient": 0.64837, "pr_curve": [[0, 1, 0.99933], [0.37719, 1, 0.99838], [0.57895, 0.98507, 0.99531], [0.60526, 0.97183, 0.99497], [0.71053, 0.9759, 0.99437], [0.76316, 0.96667, 0.99218], [0.78947, 0.96774, 0.98995], [0.90351, 0.96262, 0.98721], [0.92105, 0.9633, 0.98593], [0.9386, 0.96396, 0.98437], [0.96491, 0.96491, 0.97655], [0.96491, 0.95652, 0.9531], [0.96491, 0.94017, 0.92964], [0.97368, 0.93277, 0.42964], [0.98246, 0.93333, 0.28643], [1, 0.93443, 0.17186], [1, 0.92683, 0.14321], [1, 0.91935, 0.09548], [1, 0.912, 0.06138], [1, 0.88372, 0.04296], [1, 0.85075, null]], "precision": 0.93277, "present_in_test_data": true, "recall": 0.97368, "roc_curve": [[0, 0, 0.99933], [0, 0.37719, 0.99838], [0.05, 0.57895, 0.99531], [0.1, 0.60526, 0.99497], [0.1, 0.71053, 0.99437], [0.15, 0.76316, 0.99218], [0.15, 0.78947, 0.98995], [0.2, 0.90351, 0.98721], [0.2, 0.92105, 0.98593], [0.2, 0.9386, 0.98437], [0.2, 0.96491, 0.97655], [0.25, 0.96491, 0.9531], [0.35, 0.96491, 0.92964], [0.4, 0.97368, 0.42964], [0.4, 0.98246, 0.28643], [0.4, 1, 0.17186], [0.45, 1, 0.14321], [0.5, 1, 0.09548], [0.55, 1, 0.06138], [0.75, 1, 0.04296], [1, 1, null]], "spearmans_rho": 0.5368}, {"accuracy": 0.91791, "area_under_pr_curve": 0.82704, "area_under_roc_curve": 0.92588, "balanced_accuracy": 0.78684, "class_name": "True", "f_measure": 0.68571, "gain_curve": [[0, 0, 0.95704], [0.03731, 0.25, 0.93862], [0.06716, 0.45, 0.90452], [0.07463, 0.5, 0.85679], [0.08209, 0.55, 0.82814], [0.08955, 0.6, 0.71357], [0.10448, 0.6, 0.57036], [0.11194, 0.6, 0.07036], [0.12687, 0.65, 0.0469], [0.14179, 0.75, 0.02345], [0.14925, 0.8, 0.01563], [0.17164, 0.8, 0.01407], [0.18657, 0.8, 0.01279], [0.20149, 0.8, 0.01005], [0.30597, 0.85, 0.00782], [0.32836, 0.85, 0.00563], [0.3806, 0.9, 0.00503], [0.47015, 0.9, 0.00469], [0.5, 0.95, 0.00162], [0.6791, 1, 0.00067], [1, 1, null]], "kendalls_tau_b": 0.46897, "ks_statistic": [0.76491, 0.01563], "lift_curve": [[0, 0, 0.95704], [0.03731, 6.7, 0.93862], [0.06716, 6.7, 0.90452], [0.07463, 6.7, 0.85679], [0.08209, 6.7, 0.82814], [0.08955, 6.7, 0.71357], [0.10448, 5.74286, 0.57036], [0.11194, 5.36, 0.07036], [0.12687, 5.12353, 0.0469], [0.14179, 5.28947, 0.02345], [0.14925, 5.36, 0.01563], [0.17164, 4.66087, 0.01407], [0.18657, 4.288, 0.01279], [0.20149, 3.97037, 0.01005], [0.30597, 2.77805, 0.00782], [0.32836, 2.58864, 0.00563], [0.3806, 2.36471, 0.00503], [0.47015, 1.91429, 0.00469], [0.5, 1.9, 0.00162], [0.6791, 1.47253, 0.00067], [1, 1, null]], "max_phi": [0.76491, 0.01563], "negative_cdf": [[0, 0, 0.95704], [0.03731, 0, 0.93862], [0.06716, 0, 0.90452], [0.07463, 0, 0.85679], [0.08209, 0, 0.82814], [0.08955, 0, 0.71357], [0.10448, 0.01754, 0.57036], [0.11194, 0.02632, 0.07036], [0.12687, 0.03509, 0.0469], [0.14179, 0.03509, 0.02345], [0.14925, 0.03509, 0.01563], [0.17164, 0.0614, 0.01407], [0.18657, 0.07895, 0.01279], [0.20149, 0.09649, 0.01005], [0.30597, 0.21053, 0.00782], [0.32836, 0.23684, 0.00563], [0.3806, 0.28947, 0.00503], [0.47015, 0.39474, 0.00469], [0.5, 0.42105, 0.00162], [0.6791, 0.62281, 0.00067], [1, 1, null]], "per_threshold_confusion_matrices": [[[20, 114, 0, 0], null], [[20, 71, 43, 0], 0.00067], [[19, 48, 66, 1], 0.00162], [[18, 45, 69, 2], 0.00469], [[18, 33, 81, 2], 0.00503], [[17, 27, 87, 3], 0.00563], [[17, 24, 90, 3], 0.00782], [[16, 11, 103, 4], 0.01005], [[16, 9, 105, 4], 0.01279], [[16, 7, 107, 4], 0.01407], [[16, 4, 110, 4], 0.01563], [[15, 4, 110, 5], 0.02345], [[13, 4, 110, 7], 0.0469], [[12, 3, 111, 8], 0.07036], [[12, 2, 112, 8], 0.57036], [[12, 0, 114, 8], 0.71357], [[11, 0, 114, 9], 0.82814], [[10, 0, 114, 10], 0.85679], [[9, 0, 114, 11], 0.90452], [[5, 0, 114, 15], 0.93862], [[0, 0, 114, 20], 0.95704]], "phi_coefficient": 0.64837, "pr_curve": [[0, 1, 0.95704], [0.25, 1, 0.93862], [0.45, 1, 0.90452], [0.5, 1, 0.85679], [0.55, 1, 0.82814], [0.6, 1, 0.71357], [0.6, 0.85714, 0.57036], [0.6, 0.8, 0.07036], [0.65, 0.76471, 0.0469], [0.75, 0.78947, 0.02345], [0.8, 0.8, 0.01563], [0.8, 0.69565, 0.01407], [0.8, 0.64, 0.01279], [0.8, 0.59259, 0.01005], [0.85, 0.41463, 0.00782], [0.85, 0.38636, 0.00563], [0.9, 0.35294, 0.00503], [0.9, 0.28571, 0.00469], [0.95, 0.28358, 0.00162], [1, 0.21978, 0.00067], [1, 0.14925, null]], "precision": 0.8, "present_in_test_data": true, "recall": 0.6, "roc_curve": [[0, 0, 0.95704], [0, 0.25, 0.93862], [0, 0.45, 0.90452], [0, 0.5, 0.85679], [0, 0.55, 0.82814], [0, 0.6, 0.71357], [0.01754, 0.6, 0.57036], [0.02632, 0.6, 0.07036], [0.03509, 0.65, 0.0469], [0.03509, 0.75, 0.02345], [0.03509, 0.8, 0.01563], [0.0614, 0.8, 0.01407], [0.07895, 0.8, 0.01279], [0.09649, 0.8, 0.01005], [0.21053, 0.85, 0.00782], [0.23684, 0.85, 0.00563], [0.28947, 0.9, 0.00503], [0.39474, 0.9, 0.00469], [0.42105, 0.95, 0.00162], [0.62281, 1, 0.00067], [1, 1, null]], "spearmans_rho": 0.5368}]}, "random": {"accuracy": 0.47761, "average_area_under_pr_curve": 0, "average_area_under_roc_curve": 0, "average_balanced_accuracy": 0.40439, "average_f_measure": 0.385, "average_kendalls_tau_b": 0, "average_ks_statistic": 0, "average_max_phi": 0, "average_phi": -0.13666, "average_precision": 0.45116, "average_recall": 0.40439, "average_spearmans_rho": 0, "confusion_matrix": [[58, 56], [14, 6]], "per_class_statistics": [{"accuracy": 0.47761, "balanced_accuracy": 0.40439, "class_name": "False", "f_measure": 0.62366, "phi_coefficient": -0.13666, "precision": 0.80556, "present_in_test_data": true, "recall": 0.50877}, {"accuracy": 0.47761, "balanced_accuracy": 0.40439, "class_name": "True", "f_measure": 0.14634, "phi_coefficient": -0.13666, "precision": 0.09677, "present_in_test_data": true, "recall": 0.3}]}}, "rows": 134, "sample_rate": 1.0, "sampled_rows": 134, "shared": false, "size": 11582, "status": {"code": 5, "elapsed": 3847, "message": "The evaluation has been created", "progress": 1}, "subscription": true, "tags": [], "timeseries": "", "type": 0, "updated": "2023-07-17T21:20:05.589000"}, "error": null}

data/regression_evaluation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"code": 200, "resource": "evaluation/64adcb654a1a2c0c57cb8784", "location": "https://bigml.io/andromeda/evaluation/64adcb654a1a2c0c57cb8784", "object": {"boosted_ensemble": false, "category": 0, "code": 200, "combiner": null, "configuration": null, "configuration_status": false, "created": "2023-07-11T21:36:37.670000", "creator": "mmartin", "dataset": "dataset/64adcb5f79c60236c3593ef5", "dataset_status": true, "datasets": [], "deepnet": "", "description": "", "ensemble": "", "evaluations": null, "excluded_fields": [], "fields_map": {"000000": "000000", "000001": "000001", "000002": "000002", "000003": "000003", "000004": "000004", "000005": "000005", "000006": "000006", "000007": "000007"}, "fusion": "", "input_fields": [], "linearregression": "", "locale": "en-US", "logisticregression": "", "max_rows": 4128, "missing_strategy": 0, "model": "model/64ad258d79c60271f4826e23", "model_status": true, "model_type": 0, "name": "Stdin input vs. Stdin input", "name_options": "512-node, pruned, deterministic order, operating kind=probability", "number_of_models": 1, "objective_field_descriptors": {"000007": {"column_number": 7, "datatype": "double", "name": "Longitude", "optype": "numeric", "order": 7, "preferred": true}}, "objective_fields": ["000007"], "objective_fields_names": ["Longitude"], "operating_kind": "probability", "optiml": null, "optiml_status": false, "out_of_bag": false, "performance": 0.9288, "private": true, "project": null, "range": null, "replacement": false, "resource": "evaluation/64adcb654a1a2c0c57cb8784", "result": {"mean": {"mean_absolute_error": 1.83374, "mean_squared_error": 4.0345, "r_squared": 0}, "model": {"mean_absolute_error": 0.30921, "mean_squared_error": 0.28725, "r_squared": 0.9288}, "random": {"mean_absolute_error": 2.93722, "mean_squared_error": 12.60007, "r_squared": -2.12308}}, "rows": 4128, "sample_rate": 1.0, "sampled_rows": 4128, "shared": false, "size": 354722, "status": {"code": 5, "elapsed": 3590, "message": "The evaluation has been created", "progress": 1}, "subscription": false, "tags": [], "timeseries": "", "type": 1, "updated": "2023-07-11T21:36:43.498000"}, "error": null}

docs/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,29 @@ using a csv file as input:
796796
input_data = fields.pair([float(val) for val in row], objective_field)
797797
prediction = local_model.predict(input_data)
798798
799+
If you are interfacing with numpy-based libraries, you'll probably want to
800+
generate or read the field values as a numpy array. The ``Fields`` object
801+
offers the ``.from_numpy`` and ``.to_numpy`` methods to that end. In both,
802+
categorial fields will be one-hot encoded automatically by assigning the
803+
indices of the categories as presented in the corresponding field summary.
804+
805+
.. code-block:: python
806+
807+
from bigml.api import BigML
808+
from bigml.fields import Fields
809+
api = BigML()
810+
model = api.get_model("model/5143a51a37203f2cf7000979")
811+
fields = Fields(model)
812+
# creating a numpy array for the following input data
813+
np_inputs = fields.to_numpy({"petal length": 1})
814+
# creating an input data dictionary from a numpy array
815+
input_data = fields.from_numpy(np_inputs)
816+
817+
The numpy output of ``.to_numpy`` can be used in the
818+
`ShapWrapper <local_resources.html#local-shap-wrapper>`_ object or other
819+
functions that expect numpy arrays as inputs and the ``.from_numpy``
820+
output can be used in BigML local predictions as input.
821+
799822
If missing values are present, the ``Fields`` object can return a dict
800823
with the ids of the fields that contain missing values and its count. The
801824
following example:

docs/local_resources.rst

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,6 +2490,74 @@ to cover the particulars of the functions to be used in the generation of
24902490
new fields.
24912491
24922492
2493+
Local Evaluations
2494+
-----------------
2495+
2496+
You can instantiate a local version of an evaluation that will contain the
2497+
main evaluation metrics.
2498+
2499+
.. code-block:: python
2500+
2501+
from bigml.evaluation import Evaluation
2502+
local_evaluation = Evaluation('evaluation/502fdbff15526876610003215')
2503+
2504+
This will retrieve the remote evaluation information, using an implicitly built
2505+
``BigML()`` connection object (see the `Authentication <#authentication>`_
2506+
section for more
2507+
details on how to set your credentials) and return a Dataset object
2508+
that will be stored in the ``./storage`` directory. If you want to use a
2509+
specific connection object for the remote retrieval or a different storage
2510+
directory, you can set it as second parameter:
2511+
2512+
.. code-block:: python
2513+
2514+
from bigml.evaluation import Evaluation
2515+
from bigml.api import BigML
2516+
2517+
local_evaluation = Evaluation('evaluation/502fdbff15526876610003215',
2518+
api=BigML(my_username,
2519+
my_api_key,
2520+
storage="my_storage"))
2521+
2522+
or even use the remote evaluation information previously retrieved to build the
2523+
local evaluation object:
2524+
2525+
.. code-block:: python
2526+
2527+
from bigml.evaluation import Evaluation
2528+
from bigml.api import BigML
2529+
api = BigML()
2530+
evaluation = api.get_evaluation('evaluation/502fdbff15526876610003215')
2531+
2532+
local_evaluation = Evaluation(evaluation)
2533+
2534+
You can also build a local evaluation from a previously retrieved and
2535+
stored evaluation JSON file:
2536+
2537+
.. code-block:: python
2538+
2539+
from bigml.evaluation import Evaluation
2540+
local_evaluation = Evaluation('./my_dataset.json')
2541+
2542+
The Evaluation attributes depend on whether it belongs to a regression or a
2543+
classification. Regression evaluations will contain ``r_square``,
2544+
``mean_absolute_error``, ``mean_squared_error``. Classification evaluations
2545+
will contain ``accuracy``, ``precision``, ``recall``, ``phi`` and ``f_measure``
2546+
besides the ``confusion_matrix`` and a ``-full`` attribute that will contain
2547+
the entire set of metrics as downloaded from the API.
2548+
2549+
.. code-block:: python
2550+
2551+
from bigml.evaluation import Evaluation
2552+
local_evaluation = Evaluation('evaluation/502fdbff15526876610003215')
2553+
local_evaluation.full # entire model evaluation metrics
2554+
if local_evaluation.regression:
2555+
local_evaluation.r_squared # r-squared metric value
2556+
else:
2557+
local_evaluation.confusion_matrix # confusion matrix
2558+
local_evaluation.accuracy
2559+
2560+
24932561
Local batch predictions
24942562
-----------------------
24952563
@@ -2603,6 +2671,27 @@ and the result would be like the one below:
26032671
[200 rows x 11 columns]
26042672
26052673
2674+
Local Shap Wrapper
2675+
------------------
2676+
2677+
The Shap library accepts customized predict functions as long as they provide
2678+
a particular input/output interface that uses numpy arrays. The previously
2679+
described local models can be used to generate such an predict funcion.
2680+
The ``ShapWrapper`` class has been created to help users connect the
2681+
Shap library to BigML supervised models and provides the ``.predict`` and
2682+
``.predict_proba`` functions especially built to be used with that libary.
2683+
2684+
.. code-block:: python
2685+
2686+
from bigml.shapwrapper import ShapWrapper
2687+
shap_wrapper = ShapWrapper("model/5143a51a37203f2cf7027551")
2688+
# computing the Explainer on the X_test numpy array
2689+
explainer = shap.Explainer(shap_wrapper.predict,
2690+
X_test, algorithm='partition',
2691+
feature_names=shap_wrapper.x_headers)
2692+
shap_values = explainer(X_test)
2693+
2694+
26062695
Local predictions with shared models
26072696
------------------------------------
26082697

0 commit comments

Comments
 (0)