Mercurial > repos > goeckslab > pycaret_compare
diff pycaret_regression.py @ 3:02f7746e7772 draft default tip
planemo upload for repository https://github.com/goeckslab/Galaxy-Pycaret commit ff6d674ecc83db933153b797ef4dbde17f07b10e
author | goeckslab |
---|---|
date | Wed, 01 Jan 2025 03:19:40 +0000 |
parents | 915447b14520 |
children |
line wrap: on
line diff
--- a/pycaret_regression.py Sat Dec 14 23:18:02 2024 +0000 +++ b/pycaret_regression.py Wed Jan 01 03:19:40 2025 +0000 @@ -59,9 +59,14 @@ X_test = self.exp.X_test_transformed.copy() y_test = self.exp.y_test_transformed - explainer = RegressionExplainer(self.best_model, X_test, y_test) - self.expaliner = explainer - plots_explainer_html = "" + try: + explainer = RegressionExplainer(self.best_model, X_test, y_test) + self.expaliner = explainer + plots_explainer_html = "" + except Exception as e: + LOG.error(f"Error creating explainer: {e}") + self.plots_explainer_html = None + return try: fig_importance = explainer.plot_importances()