Skip to content

Commit

Permalink
Change col names
Browse files Browse the repository at this point in the history
  • Loading branch information
Meraldo Antonio committed Nov 22, 2024
1 parent d765033 commit 270be35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions skpro/regression/bayesian/bayesian_conjugate.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def _fit(self, X, y):
if not is_centered:
X -= X.mean(axis=0)

self._y_cols = y.columns

# Construct the prior mean, covariance, and precision
self._prior_mu = np.zeros(n_features)
self._prior_cov = np.eye(n_features) / self.alpha
Expand All @@ -116,7 +118,6 @@ def _predict_proba(self, X):
y_pred : Normal
Predicted Normal distribution for outputs.
"""
y_cols = self._y_cols
idx = X.index
if isinstance(X, pd.DataFrame):
X = X.values
Expand Down Expand Up @@ -145,7 +146,7 @@ def _predict_proba(self, X):
self._y_pred = Normal(
mu=mus,
sigma=sigmas,
columns=y_cols,
columns=self.y_cols,
index=idx,
).iloc[:, 0]
return self._y_pred
Expand Down

0 comments on commit 270be35

Please sign in to comment.