Skip to content

Commit

Permalink
Adjust import style
Browse files Browse the repository at this point in the history
  • Loading branch information
tennlee committed Aug 24, 2023
1 parent d551bbd commit 5c386f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scores/stats/tests/diebold_mariano_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from scipy.optimize import least_squares

from scores.utils import dims_complement
from scores.stats.tests import acovf

from scores.stats.tests.acovf import acovf


def diebold_mariano(
Expand Down Expand Up @@ -297,7 +298,7 @@ def _hg_method_stat(diffs: np.ndarray, h: int) -> float:

# use an exponential model for autocovariances of `diffs`
max_lag = int(max(np.floor((n - 1) / 2), h))
sample_autocvs = acovf.acovf(diffs)[0:max_lag]
sample_autocvs = acovf(diffs)[0:max_lag]
sample_lags = np.arange(max_lag)
model_params = least_squares(_hg_func, [1, 1], args=(sample_lags, sample_autocvs), bounds=(0, np.inf)).x

Expand Down

0 comments on commit 5c386f6

Please sign in to comment.