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

FishersS encounters error #13

Open
DanSchnell opened this issue Jun 28, 2022 · 2 comments
Open

FishersS encounters error #13

DanSchnell opened this issue Jun 28, 2022 · 2 comments

Comments

@DanSchnell
Copy link

Hi,

I've tried the FishersS() estimation using several values of condition number and several datasets and all come back with the same error.

See below for 2 examples using the tutorial dataset. Am I missing something? Do I need to specify alphas? Running with python 3.7.3 on a MacBook.

Thanks much,
Dan Schnell CCHMC

data = np.zeros((1000,10))
data[:,:5] = skdim.datasets.hyperBall(n = 1000, d = 5, radius = 1, random_state = 0)

pca=skdim.id.lPCA()
gid1=pca.fit(data).dimension_
gid1
5
FS2 = skdim.id.FisherS(conditional_number=10, project_on_sphere=1, alphas=None, produce_plots=False, verbose=0, limit_maxdim=False).fit(data)
Traceback (most recent call last):
File "", line 1, in
File "//anaconda3/lib/python3.7/site-packages/skdim/id/_FisherS.py", line 123, in fit
) = self._SeparabilityAnalysis(X)
File "//anaconda3/lib/python3.7/site-packages/skdim/id/_FisherS.py", line 617, in _SeparabilityAnalysis
separable_fraction, p_alpha = self._checkSeparabilityMultipleAlpha(Xp)
File "//anaconda3/lib/python3.7/site-packages/skdim/id/_FisherS.py", line 259, in _checkSeparabilityMultipleAlpha
counts[k:e, :] = counts[k:e, :] + self._histc(xy.T, alphas)
TypeError: expected dtype object, got 'numpy.dtype[float64]'
FS1 = skdim.id.FisherS().fit(data)
Traceback (most recent call last):
File "", line 1, in
File "//anaconda3/lib/python3.7/site-packages/skdim/id/_FisherS.py", line 123, in fit
) = self._SeparabilityAnalysis(X)
File "//anaconda3/lib/python3.7/site-packages/skdim/id/_FisherS.py", line 617, in _SeparabilityAnalysis
separable_fraction, p_alpha = self._checkSeparabilityMultipleAlpha(Xp)
File "//anaconda3/lib/python3.7/site-packages/skdim/id/_FisherS.py", line 259, in _checkSeparabilityMultipleAlpha
counts[k:e, :] = counts[k:e, :] + self._histc(xy.T, alphas)
TypeError: expected dtype object, got 'numpy.dtype[float64]'

@j-bac
Copy link
Collaborator

j-bac commented Jun 28, 2022

Hi,
I tried to reproduce the error in an environment with your python version but didn't have any issues (Ubuntu 20.04). I don't have an idea where this can come from, maybe you can try a fresh environment like below :

conda create -n test_skdim python=3.7.3
conda activate test_skdim
pip install scikit-dimension pandas numba numpy matplotlib

versions I got :
scikit-dimension '0.3'
numpy '1.21.6'
numba '0.55.2'
pandas '1.3.5'
matplotlib '3.5.2'

@DanSchnell
Copy link
Author

DanSchnell commented Jun 28, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants