Skip to content

Commit

Permalink
DEBUG test_compute_bias_numerical_feature
Browse files Browse the repository at this point in the history
  • Loading branch information
lorentzenchr committed Feb 24, 2024
1 parent 9748c2b commit 4c4b501
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ def test_compute_bias_numerical_feature():
# With polars==0.19.19, to_numpy() returns polars.series._numpy.SeriesView instead
# of numpy array. Therefore, we add the np.asarray().
bias = np.asarray((df.get_column("y_pred") - df.get_column("y_obs")).to_numpy())
assert n_steps == 10
assert np.sqrt(n_steps) == pytest.approx(3.1622776601683795)
assert np.std(bias[: n_steps], ddof=1) == pytest.approx(0.030276503540974924)
df_expected = pl.DataFrame(
{
"feature": 0.045 + 0.1 * np.arange(10),
Expand Down

0 comments on commit 4c4b501

Please # to comment.