Residual Partial dependence / Individual Conditional Expectation (PD/ICE) Explainer Demo
This example demonstrates how to interpret a scikit-learn model using the H2O Eval Studio library and retrieve the data and residual partial dependence plot.
[1]:
import logging
import os
import pandas
import datatable
import webbrowser
from h2o_sonar import interpret
from h2o_sonar.lib.api import commons
from h2o_sonar.lib.api import explainers
from h2o_sonar.lib.api.models import ModelApi
from h2o_sonar.explainers.residual_pd_ice_explainer import ResidualPdIceExplainer
from sklearn.ensemble import GradientBoostingClassifier
[2]:
# dataset
dataset_path = "../../data/creditcard.csv"
target_col = "default payment next month"
df = pandas.read_csv(dataset_path)
(X, y) = df.drop(target_col, axis=1), df[target_col]
# results
results_location = "../../results"
os.makedirs(results_location, exist_ok=True)
[3]:
# explainer description
interpret.describe_explainer(ResidualPdIceExplainer)
[3]:
{'id': 'h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainer',
'name': 'ResidualPdIceExplainer',
'display_name': 'Residual Partial Dependence Plot',
'description': 'The residual partial dependence plot (PDP) indicates which variables interact most with the error. Residuals are differences between observed and predicted values - the square of the difference between observed and predicted values is used. The residual partial dependence is created using normal partial dependence algorithm, while instead of prediction is used the residual. Individual Conditional Expectations plot (ICE) displays the interaction with error for an individual row of data when an input variable is toggled across its domain.',
'model_types': ['iid', 'time_series'],
'can_explain': ['regression', 'binomial', 'multinomial'],
'explanation_scopes': ['global_scope', 'local_scope'],
'explanations': [{'explanation_type': 'global-partial-dependence',
'name': 'PartialDependenceExplanation',
'category': None,
'scope': 'global',
'has_local': None,
'formats': []},
{'explanation_type': 'local-individual-conditional-explanation',
'name': 'IndividualConditionalExplanation',
'category': None,
'scope': 'local',
'has_local': None,
'formats': []}],
'parameters': [{'name': 'sample_size',
'description': 'Sample size for Partial Dependence Plot',
'comment': '',
'type': 'int',
'val': 25000,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'max_features',
'description': 'Partial Dependence Plot number of features (to see all features used by model set to -1).',
'comment': '',
'type': 'int',
'val': 10,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'features',
'description': 'Partial Dependence Plot feature list.',
'comment': '',
'type': 'list',
'val': None,
'predefined': [],
'tags': ['SOURCE_DATASET_COLUMN_NAMES'],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'oor_grid_resolution',
'description': 'Partial Dependence Plot number of out of range bins.',
'comment': '',
'type': 'int',
'val': 0,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'quantile-bin-grid-resolution',
'description': 'Partial Dependence Plot quantile binning (total quantile points used to create bins).',
'comment': '',
'type': 'int',
'val': 0,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'grid_resolution',
'description': 'Partial Dependence Plot observations per bin (number of equally spaced points used to create bins).',
'comment': '',
'type': 'int',
'val': 20,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'center',
'description': 'Center Partial Dependence Plot using ICE centered at 0.',
'comment': '',
'type': 'bool',
'val': False,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'sort_bins',
'description': 'Ensure bin values sorting.',
'comment': '',
'type': 'bool',
'val': True,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'histograms',
'description': 'Enable histograms.',
'comment': '',
'type': 'bool',
'val': True,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'quantile-bins',
'description': 'Per-feature quantile binning (Example: if choosing features\n F1 and F2, this parameter is \'{"F1": 2,"F2": 5}\'. Note, you can\n set all features to use the same quantile binning with the\n `Partial Dependence Plot quantile binning` parameter and then\n adjust the quantile binning for a subset of PDP features with\n this parameter).',
'comment': '',
'type': 'str',
'val': '',
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'numcat_num_chart',
'description': 'Unique feature values count driven Partial Dependence Plot binning and chart selection.',
'comment': '',
'type': 'bool',
'val': True,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'numcat_threshold',
'description': 'Threshold for Partial Dependence Plot binning and chart selection (<=threshold categorical, >threshold numeric).',
'comment': '',
'type': 'int',
'val': 11,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''}],
'keywords': ['can-add-feature', 'explains-model-debugging']}
Interpretation
[4]:
# scikit-learn model
gradient_booster = GradientBoostingClassifier(learning_rate=0.1)
gradient_booster.fit(X, y)
# explainable model
model = ModelApi().create_model(target_col=target_col, model_src=gradient_booster, used_features=X.columns.to_list())
interpretation = interpret.run_interpretation(
dataset=df,
model=model,
target_col=target_col,
results_location=results_location,
log_level=logging.INFO,
explainers=[
commons.ExplainerToRun(
explainer_id=ResidualPdIceExplainer.explainer_id(),
params="",
)
]
)
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 10.0%
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 20.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 20.0%
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 20.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 30.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 30.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 30.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 40.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 40.0%
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 50.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 50.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 60.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 60.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 60.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 70.0%
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 70.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 70.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 80.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 80.0%
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
X does not have valid feature names, but GradientBoostingClassifier was fitted with feature names
2022-10-10 23:12:08,965 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 saving PD to ../../results/h2o-sonar/mli_experiment_cec1284d-7ee5-4abe-9c46-57d0a84f777f/explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-pd-dai-model.json
2022-10-10 23:12:08,970 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 computation finished & stored to: ../../results/h2o-sonar/mli_experiment_cec1284d-7ee5-4abe-9c46-57d0a84f777f/explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-pd-dai-model.json
2022-10-10 23:12:08,976 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: ID/True
2022-10-10 23:12:08,978 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: ID/False
2022-10-10 23:12:08,982 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: LIMIT_BAL/True
2022-10-10 23:12:08,996 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: LIMIT_BAL/False
2022-10-10 23:12:09,011 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: SEX/True
2022-10-10 23:12:09,012 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: SEX/False
2022-10-10 23:12:09,025 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: EDUCATION/True
2022-10-10 23:12:09,026 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: EDUCATION/False
2022-10-10 23:12:09,029 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: MARRIAGE/True
2022-10-10 23:12:09,050 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: MARRIAGE/False
2022-10-10 23:12:09,065 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: AGE/True
2022-10-10 23:12:09,077 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: AGE/False
2022-10-10 23:12:09,082 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_0/True
2022-10-10 23:12:09,083 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_0/False
2022-10-10 23:12:09,088 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_2/True
2022-10-10 23:12:09,093 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_2/False
2022-10-10 23:12:09,096 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_3/True
2022-10-10 23:12:09,097 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_3/False
2022-10-10 23:12:09,101 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_4/True
2022-10-10 23:12:09,102 - h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainerLogger - INFO - Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 creating histogram: PAY_4/False
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 90.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 90.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 90.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 90.0%
h2o_sonar.explainers.pd_ice_explainer.PdIceExplainer: progress 100.0%
Explainer Result
[5]:
# retrieve the result
result = interpretation.get_explainer_result(ResidualPdIceExplainer.explainer_id())
[6]:
# open interpretation HTML report in web browser
webbrowser.open(interpretation.result.get_html_report_location())
[6]:
True
[7]:
# summary
result.summary()
[7]:
{'id': 'h2o_sonar.explainers.residual_pd_ice_explainer.ResidualPdIceExplainer',
'name': 'ResidualPdIceExplainer',
'display_name': 'Residual Partial Dependence Plot',
'description': 'The residual partial dependence plot (PDP) indicates which variables interact most with the error. Residuals are differences between observed and predicted values - the square of the difference between observed and predicted values is used. The residual partial dependence is created using normal partial dependence algorithm, while instead of prediction is used the residual. Individual Conditional Expectations plot (ICE) displays the interaction with error for an individual row of data when an input variable is toggled across its domain.',
'model_types': ['iid', 'time_series'],
'can_explain': ['regression', 'binomial', 'multinomial'],
'explanation_scopes': ['global_scope', 'local_scope'],
'explanations': [{'explanation_type': 'global-partial-dependence',
'name': 'Partial Dependence Plot (PDP)',
'category': 'DAI MODEL',
'scope': 'global',
'has_local': 'local-individual-conditional-explanation',
'formats': ['application/json']},
{'explanation_type': 'local-individual-conditional-explanation',
'name': 'Individual Conditional Expectations (ICE)',
'category': 'DAI MODEL',
'scope': 'local',
'has_local': None,
'formats': ['application/vnd.h2oai.json+datatable.jay']},
{'explanation_type': 'global-html-fragment',
'name': 'Partial Dependence Plot (PDP)',
'category': 'DAI MODEL',
'scope': 'global',
'has_local': None,
'formats': ['text/html']}],
'parameters': [{'name': 'sample_size',
'description': 'Sample size for Partial Dependence Plot',
'comment': '',
'type': 'int',
'val': 25000,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'max_features',
'description': 'Partial Dependence Plot number of features (to see all features used by model set to -1).',
'comment': '',
'type': 'int',
'val': 10,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'features',
'description': 'Partial Dependence Plot feature list.',
'comment': '',
'type': 'list',
'val': None,
'predefined': [],
'tags': ['SOURCE_DATASET_COLUMN_NAMES'],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'oor_grid_resolution',
'description': 'Partial Dependence Plot number of out of range bins.',
'comment': '',
'type': 'int',
'val': 0,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'quantile-bin-grid-resolution',
'description': 'Partial Dependence Plot quantile binning (total quantile points used to create bins).',
'comment': '',
'type': 'int',
'val': 0,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'grid_resolution',
'description': 'Partial Dependence Plot observations per bin (number of equally spaced points used to create bins).',
'comment': '',
'type': 'int',
'val': 20,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'center',
'description': 'Center Partial Dependence Plot using ICE centered at 0.',
'comment': '',
'type': 'bool',
'val': False,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'sort_bins',
'description': 'Ensure bin values sorting.',
'comment': '',
'type': 'bool',
'val': True,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'histograms',
'description': 'Enable histograms.',
'comment': '',
'type': 'bool',
'val': True,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'quantile-bins',
'description': 'Per-feature quantile binning (Example: if choosing features\n F1 and F2, this parameter is \'{"F1": 2,"F2": 5}\'. Note, you can\n set all features to use the same quantile binning with the\n `Partial Dependence Plot quantile binning` parameter and then\n adjust the quantile binning for a subset of PDP features with\n this parameter).',
'comment': '',
'type': 'str',
'val': '',
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'numcat_num_chart',
'description': 'Unique feature values count driven Partial Dependence Plot binning and chart selection.',
'comment': '',
'type': 'bool',
'val': True,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''},
{'name': 'numcat_threshold',
'description': 'Threshold for Partial Dependence Plot binning and chart selection (<=threshold categorical, >threshold numeric).',
'comment': '',
'type': 'int',
'val': 11,
'predefined': [],
'tags': [],
'min_': 0.0,
'max_': 0.0,
'category': ''}],
'keywords': ['can-add-feature', 'explains-model-debugging']}
Display PD Data
[8]:
result.data(feature_name="EDUCATION")
[8]:
bin | pd | sd | oor | |
---|---|---|---|---|
▪▪▪▪ | ▪▪▪▪▪▪▪▪ | ▪▪▪▪▪▪▪▪ | ▪ | |
0 | 0 | 0.6383 | 0.480517 | 0 |
1 | 1 | 0.6383 | 0.480517 | 0 |
2 | 2 | 0.5176 | 0.499715 | 0 |
3 | 3 | 0.6041 | 0.489068 | 0 |
4 | 4 | 0.2462 | 0.430818 | 0 |
5 | 5 | 0.2462 | 0.430818 | 0 |
6 | 6 | 0.5065 | 0.499983 | 0 |
[9]:
result.data(feature_name="PAY_3")
[9]:
bin | pd | sd | oor | |
---|---|---|---|---|
▪▪▪▪ | ▪▪▪▪▪▪▪▪ | ▪▪▪▪▪▪▪▪ | ▪ | |
0 | −2 | 0.6009 | 0.489738 | 0 |
1 | −1 | 0.6009 | 0.489738 | 0 |
2 | 0 | 0.6009 | 0.489738 | 0 |
3 | 1 | 0.7499 | 0.433092 | 0 |
4 | 2 | 0.3824 | 0.485998 | 0 |
5 | 3 | 0.3824 | 0.485998 | 0 |
6 | 4 | 0.3824 | 0.485998 | 0 |
7 | 5 | 0.3824 | 0.485998 | 0 |
8 | 6 | 0.3824 | 0.485998 | 0 |
9 | 7 | 0.3824 | 0.485998 | 0 |
10 | 8 | 0.3824 | 0.485998 | 0 |
Plot PD Data
[10]:
result.plot(feature_name="PAY_3")
Save Explainer Log and Data
[11]:
# save the explainer log
result.log(path="./residual-pd-ice-demo.log")
[12]:
!head residual-pd-ice-demo.log
2022-10-10 23:12:07,438 INFO [PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08] BEGIN
2022-10-10 23:12:07,439 INFO [PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08] loading dataset
2022-10-10 23:12:07,439 INFO [PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08] loaded dataset has 10000 rows and 25 columns
2022-10-10 23:12:07,439 INFO [PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08] getting features list, importanceand metadata
2022-10-10 23:12:07,439 INFO Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 all most important model features: ['ID', 'LIMIT_BAL', 'SEX', 'EDUCATION', 'MARRIAGE', 'AGE', 'PAY_0', 'PAY_2', 'PAY_3', 'PAY_4', 'PAY_5', 'PAY_6', 'BILL_AMT1', 'BILL_AMT2', 'BILL_AMT3', 'BILL_AMT4', 'BILL_AMT5', 'BILL_AMT6', 'PAY_AMT1', 'PAY_AMT2', 'PAY_AMT3', 'PAY_AMT4', 'PAY_AMT5', 'PAY_AMT6']
2022-10-10 23:12:07,439 INFO Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 features used by model: ['ID', 'LIMIT_BAL', 'SEX', 'EDUCATION', 'MARRIAGE', 'AGE', 'PAY_0', 'PAY_2', 'PAY_3', 'PAY_4', 'PAY_5', 'PAY_6', 'BILL_AMT1', 'BILL_AMT2', 'BILL_AMT3', 'BILL_AMT4', 'BILL_AMT5', 'BILL_AMT6', 'PAY_AMT1', 'PAY_AMT2', 'PAY_AMT3', 'PAY_AMT4', 'PAY_AMT5', 'PAY_AMT6']
2022-10-10 23:12:07,439 INFO Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08: calculating PD for features ['ID', 'LIMIT_BAL', 'SEX', 'EDUCATION', 'MARRIAGE', 'AGE', 'PAY_0', 'PAY_2', 'PAY_3', 'PAY_4']
2022-10-10 23:12:07,439 INFO Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 feature metadata: {}
2022-10-10 23:12:07,439 INFO Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 1 frame strategy: True
2022-10-10 23:12:08,965 INFO Residual PD/ICE cec1284d-7ee5-4abe-9c46-57d0a84f777f/ba27172f-dcab-4a12-95a6-215efc570f08 saving PD to ../../results/h2o-sonar/mli_experiment_cec1284d-7ee5-4abe-9c46-57d0a84f777f/explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-pd-dai-model.json
[13]:
# save the explainer data
result.zip(file_path="./residual-pd-ice-demo-archive.zip")
[14]:
!unzip -l residual-pd-ice-demo-archive.zip
Archive: residual-pd-ice-demo-archive.zip
Length Date Time Name
--------- ---------- ----- ----
6886 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/result_descriptor.json
151 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json.meta
7156 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/explanation.json
924 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_3_class_0.json
2557 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_5_class_0.json
321 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_2_class_0.json
2647 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_0_class_0.json
1417 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_8_class_0.json
1411 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_6_class_0.json
1410 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_9_class_0.json
1413 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_7_class_0.json
2741 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_1_class_0.json
563 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_partial_dependence/application_json/pd_feature_4_class_0.json
165 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay.meta
7096 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/explanation.json
1601936 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_0_class_0.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_8_class_0.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_9_class_0.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_7_class_0.jay
1601944 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_1_class_0.jay
560688 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_3_class_0.jay
320440 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_4_class_0.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_6_class_0.jay
1601784 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_5_class_0.jay
80184 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/y_hat.jay
160272 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/local_individual_conditional_explanation/application_vnd_h2oai_json_datatable_jay/ice_feature_2_class_0.jay
110 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html.meta
11446 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-3.png
11663 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-1.png
16954 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-9.png
23985 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-4.png
16845 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-5.png
4198 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/explanation.html
16891 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-2.png
11369 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-6.png
11441 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-7.png
16068 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-10.png
11382 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/global_html_fragment/text_html/pd-class-1-feature-8.png
5664 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/log/explainer_run_ba27172f-dcab-4a12-95a6-215efc570f08.log
320440 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-5.jay
22215 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-pd-dai-model.json
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-8.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-9.jay
1601936 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-1.jay
560688 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-4.jay
1601784 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-6.jay
1601944 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-2.jay
80184 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/mli_dataset_y_hat.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-10.jay
881024 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-7.jay
160272 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model-3.jay
2519 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/work/h2o_sonar-ice-dai-model.json
795 2022-10-10 23:12 explainer_h2o_sonar_explainers_residual_pd_ice_explainer_ResidualPdIceExplainer_ba27172f-dcab-4a12-95a6-215efc570f08/model_problems/problems_and_actions.json
--------- -------
19123091 53 files
[ ]: