Skip to content

Commit

Permalink
Fixed factor related to ISJ (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyod committed May 26, 2021
1 parent 5e37ade commit cf6023d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion KDEpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from KDEpy.TreeKDE import TreeKDE
from KDEpy.FFTKDE import FFTKDE

__version__ = "1.0.11"
__version__ = "1.1.0"
__author__ = "tommyod"

TreeKDE = TreeKDE
Expand Down
5 changes: 4 additions & 1 deletion KDEpy/bw_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ def improved_sheather_jones(data, weights=None):
a = fftpack.dct(initial_data)

# Compute the bandwidth
# The definition of a2 used here and in `_fixed_point` correspond to
# the one cited in this issue:
# https://github.com/tommyod/KDEpy/issues/95
I_sq = np.power(np.arange(1, n, dtype=FLOAT), 2)
a2 = a[1:] ** 2 / 4
a2 = a[1:] ** 2

# Solve for the optimal (in the AMISE sense) t
t_star = _root(_fixed_point, N, args=(N, I_sq, a2))
Expand Down

0 comments on commit cf6023d

Please sign in to comment.