FishersS encounters error
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]'
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'
Thanks much Jonathan for your quick reply. I will try with a different environment/machine.
From: Jonathan Bac @.> Reply-To: scikit-learn-contrib/scikit-dimension @.> Date: Tuesday, June 28, 2022 at 6:07 PM To: scikit-learn-contrib/scikit-dimension @.> Cc: "Schnell, Dan" @.>, Author @.***> Subject: Re: [scikit-learn-contrib/scikit-dimension] FishersS encounters error (Issue #13)
This email originated from an EXTERNAL sender to CCHMC. Proceed with caution when replying, opening attachments, or clicking links in this message.
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'
— Reply to this email directly, view it on GitHubhttps://github.com/scikit-learn-contrib/scikit-dimension/issues/13#issuecomment-1169330837, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJIX34IAEYT25OJ2D6G4473VRNZQZANCNFSM52DTXB3Q. You are receiving this because you authored the thread.Message ID: @.***>