berenslab / RFEst

A Python 3 toolbox for neural receptive field estimation using splines and Gaussian priors.
https://arxiv.org/abs/2108.07537
GNU General Public License v3.0
24 stars 3 forks source link

sklearn dependency is missing #28

Closed michaeldeistler closed 9 months ago

michaeldeistler commented 9 months ago

After installing rfest I got an error at import:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[16], line 1
----> 1 import rfest

File ~/Documents/phd/RFEst/rfest/__init__.py:3
      1 from rfest.version import __version__
----> 3 from rfest.EvidenceOpt import *
      4 from rfest.GLM import *
      5 from rfest.splines import build_spline_matrix

File ~/Documents/phd/RFEst/rfest/EvidenceOpt/__init__.py:2
      1 from rfest.EvidenceOpt._ald import ALD
----> 2 from rfest.EvidenceOpt._ard import ARD, ARDFixedPoint
      3 from rfest.EvidenceOpt._asd import ASD
      4 from rfest.EvidenceOpt._base import EmpiricalBayes

File ~/Documents/phd/RFEst/rfest/EvidenceOpt/_ard.py:2
      1 import jax.numpy as np
----> 2 from sklearn.metrics import mean_squared_error
      4 from rfest.EvidenceOpt._base import EmpiricalBayes
      5 from rfest.priors import sparsity_kernel

ModuleNotFoundError: No module named 'sklearn'

I expect that this is because your requirements.txt reads sklearn instead of scikit-learn.

pip install scikit-learn fixes it.

huangziwei commented 9 months ago

thanks a lot.