当前位置:网站首页>Map of mL: Based on Boston house price regression prediction data set, an interpretable case of xgboost model using map value

Map of mL: Based on Boston house price regression prediction data set, an interpretable case of xgboost model using map value

2022-07-04 14:21:00 A Virgo procedural ape

 ML And shap: be based on boston Boston house price regression forecast data set utilization shap It's worth it XGBoost Model implementation interpretability case  

Catalog

be based on boston Boston house price regression forecast data set utilization shap It's worth it XGBoost Model implementation interpretability case

# 1、 Define datasets

# 2、 Data set preprocessing

# 4、 be based on XGBR Model implementation shap Value analysis

# 4.1、 Model building and training

# 4.2、 Output the importance of features based on the model itself

# 4.3、 The local independent graph visualizes how the change of a feature affects the output of the model and the distribution of the eigenvalue

# 4.4、 utilize Shap Value interpretation XGBR Model

# 4.5、 be based on XGBoost Model implementation Shap Value visual analysis


be based on boston Boston house price regression forecast data set utilization shap It's worth it XGBoost Model implementation interpretability case

# 1、 Define datasets

Updating ……

# 2、 Data set preprocessing

Updating ……

# 4、 be based on XGBR Model implementation shap Value analysis

# 4.1、 Model building and training

# 4.2、 be based on The importance of the output characteristics of the model itself

XGBR_importance_dict: [('DIS', 57), ('RM', 42), ('LSTAT', 39), ('PTRATIO', 29), ('NOX', 28), ('TAX', 28), ('CRIM', 23), ('B', 15), ('AGE', 13), ('RAD', 8), ('INDUS', 8), ('CHAS', 4), ('ZN', 1)]

 

# 4.3、 The local independent graph visualizes how the change of a feature affects the output of the model and the distribution of the eigenvalue

 

# 4.4、 utilize Shap Value interpretation XGBR Model

# 4.5、 be based on XGBoost Model implementation Shap Value visual analysis

# (1)、 Use local independent graph to calculate shap value

     

# (2)、 Sample value of a column ( The eigenvalue )、 And the corresponding shap Value scatter visualization

 

# (3)、 Calculate for each feature in all samples shap Mean absolute value / Maximum absolute bar graph visualization

 

# (4)、 Calculate for each feature in all samples shap Visualization of mean absolute value bee colony graph

 

 

# (5)、 Calculate for each feature in all samples shap Average absolute value heat map visualization

 

 

# (6)、 be based on cluste The algorithm processes the characteristics of correlation and visualizes

​​​​​​​

 

 

原网站

版权声明
本文为[A Virgo procedural ape]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041233358580.html