Skip to content

Commit

Permalink
Uncommented visualize model
Browse files Browse the repository at this point in the history
  • Loading branch information
Meraldo Antonio committed Oct 5, 2024
1 parent 21102b2 commit 0b3408d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions skpro/regression/bayesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
__author__ = ["meraldoantonio"]

from skpro.regression.base import BaseProbaRegressor

# from skpro.utils.validation._dependencies import _check_soft_dependencies
from skpro.utils.validation._dependencies import _check_soft_dependencies


class BayesianLinearRegressor(BaseProbaRegressor):
Expand Down Expand Up @@ -179,16 +178,16 @@ def _fit(self, X, y):
self.idata.add_groups(training_data=training_data.to_xarray())
return self

# def visualize_model(self, **kwargs):
# """Use Graphviz to visualize the model flow."""
# _check_soft_dependencies(
# "graphviz", msg="You need to install Graphviz to use this method!"
# )
# import pymc as pm
def visualize_model(self, **kwargs):
"""Use Graphviz to visualize the model flow."""
_check_soft_dependencies(
"graphviz", msg="You need to install Graphviz to use this method!"
)
import pymc as pm

# assert self._is_fitted, "You need to fit the model before visualizing it!"
assert self._is_fitted, "You need to fit the model before visualizing it!"

# return pm.model_to_graphviz(self.model, **kwargs)
return pm.model_to_graphviz(self.model, **kwargs)

def _sample_dataset(self, group_name, return_type=None):
"""
Expand Down

0 comments on commit 0b3408d

Please sign in to comment.