Skip to content

Commit

Permalink
reshaped mu and sigma to include a second dimension for columns insid…
Browse files Browse the repository at this point in the history
…e predict_proba
  • Loading branch information
julian-fong committed Jul 29, 2024
1 parent 76c538b commit 323a043
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions skpro/regression/_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ def _predict_proba(self, X):
"""
X_ind = X.index
X_n_rows = X.shape[0]

if self.strategy == "normal":
# broadcast the mu and sigma from fit to the length of X
mu = np.ones(X_n_rows) * self._mu
sigma = np.ones(X_n_rows) * self._sigma
mu = np.reshape((np.ones(X_n_rows) * self._mu), (-1, 1))
sigma = np.reshape((np.ones(X_n_rows) * self._sigma), (-1, 1))
pred_dist = Normal(mu=mu, sigma=sigma, index=X_ind, columns=self._y_columns)

return pred_dist

if self.strategy == "empirical":
Expand Down

0 comments on commit 323a043

Please sign in to comment.