Skip to content

Commit

Permalink
[BUG] fix missing np.abs in ResidualDouble (#47)
Browse files Browse the repository at this point in the history
This PR fixes an unreported bug, a missing `np.abs` in `ResidualDouble`.

Acknowledging that the estimator does not have all its features migrated
yet, but the abs operator was missing.

Tests did not catch this as this would just result in bad predictions.
  • Loading branch information
fkiraly authored Aug 27, 2023
1 parent fb933f0 commit 7220551
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion skpro/regression/residual.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

__author__ = ["fkiraly"]

import numpy as np
import pandas as pd
from sklearn import clone

Expand Down Expand Up @@ -104,7 +105,7 @@ def _fit(self, X, y):
y = y.values.flatten()

est.fit(X, y)
resids = y - est.predict(X)
resids = np.abs(y - est.predict(X))

resids = resids.flatten()

Expand Down

0 comments on commit 7220551

Please sign in to comment.