| 140 | } |
| 141 | |
| 142 | class ModelExplainer: |
| 143 | |
| 144 | |
| 145 | def explain_predictions(self, model: BaseEstimator, X: np.ndarray, |
| 146 | feature_names: List[str]) -> Dict[str, float]: |
| 147 | |
| 148 | if hasattr(model, 'feature_importances_'): |
| 149 | return dict(zip(feature_names, model.feature_importances_)) |
| 150 | return {} |
| 151 | |
| 152 | class ModelDeployer: |
| 153 |