comparison 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
comparison
equal deleted inserted replaced
2:009b18a75dc3 3:02f7746e7772
57 from explainerdashboard import RegressionExplainer 57 from explainerdashboard import RegressionExplainer
58 58
59 X_test = self.exp.X_test_transformed.copy() 59 X_test = self.exp.X_test_transformed.copy()
60 y_test = self.exp.y_test_transformed 60 y_test = self.exp.y_test_transformed
61 61
62 explainer = RegressionExplainer(self.best_model, X_test, y_test) 62 try:
63 self.expaliner = explainer 63 explainer = RegressionExplainer(self.best_model, X_test, y_test)
64 plots_explainer_html = "" 64 self.expaliner = explainer
65 plots_explainer_html = ""
66 except Exception as e:
67 LOG.error(f"Error creating explainer: {e}")
68 self.plots_explainer_html = None
69 return
65 70
66 try: 71 try:
67 fig_importance = explainer.plot_importances() 72 fig_importance = explainer.plot_importances()
68 plots_explainer_html += add_plot_to_html(fig_importance) 73 plots_explainer_html += add_plot_to_html(fig_importance)
69 plots_explainer_html += add_hr_to_html() 74 plots_explainer_html += add_hr_to_html()