Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue computing ApEn with scikit-learn version 1.3.1 #910

Open
danibene opened this issue Sep 21, 2023 · 6 comments
Open

Issue computing ApEn with scikit-learn version 1.3.1 #910

danibene opened this issue Sep 21, 2023 · 6 comments
Labels
wontfix This will not be worked on

Comments

@danibene
Copy link
Collaborator

Describe the bug
Tried to run hrv() after upgrading from scikit-learn 1.3.0 to 1.3.1 and got the following error:

out["ApEn"], _ = entropy_approximate(rri, delay=1, dimension=2, tolerance=tolerance)
/neurokit2/complexity/entropy_approximate.py", line 100, in entropy_approximate
    out, _ = _entropy_apen(signal, delay, dimension, info["Tolerance"], **kwargs)
/neurokit2/complexity/optim_complexity_tolerance.py", line 363, in _entropy_apen
    phi, info = _phi(
/neurokit2/complexity/utils.py", line 29, in _phi
    embedded1, count1, kdtree1 = _get_count(
/neurokit2/complexity/utils.py", line 115, in _get_count
    valid_metrics = sklearn.neighbors.KDTree.valid_metrics() + ["range"]
TypeError: 'list' object is not callable

Downgrading to scikit-learn 1.3.0 fixed it.

System Specifications
I am using neurokit2 0.2.6, pandas 1.5.3, scipy 1.11.2, and numpy 1.24.3

@DominiqueMakowski
Copy link
Member

Yes, I just realized it's what messing up with the CIs, let me give it a fix

@danibene
Copy link
Collaborator Author

Seems like it's related to this: scikit-learn/scikit-learn#26754

@danibene
Copy link
Collaborator Author

Yes, I just realized it's what messing up with the CIs, let me give it a fix

Thank you!

DominiqueMakowski added a commit that referenced this issue Sep 21, 2023
@DominiqueMakowski
Copy link
Member

Weird the tests still fail as if they weren't running with the update I made

@DominiqueMakowski
Copy link
Member

I think I'll merge that branch soon anyway, and then we'll see from dev

Copy link

stale bot commented Mar 17, 2024

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants