Open architec997 opened 6 years ago
I suspect this is an arg order issue in the code somewhere, possibly due to additions. This is a little disconcerting. Let me see if I can track this down later today.
Sorry, I ran out of time today. I'll have to try and get to this a little later. My apologies for the delay.
Also getting "TypeError: descriptor 'get_metric' requires a 'hdbscan.dist_metrics.DistanceMetric' object but received a 'str'', even when just using the simple case in the documentation.
Error occurs with RobustSingleLinkage as well.
When trying to avoid the get_metric method receiving the string 'euclidean' or 'manhattan' etc. instead of the expected object, I used a precomputed distance matrix. Now getting:
NameError Traceback (most recent call last)
Sorry, I'm having trouble reproducing this. Can you tell me a little more about your setup?
I also checked - I have the same error using a precomputed distance matrix as farfan92.
Ubuntu 17.10, Anaconda 5.0.1, Python 3.6. The versions of packages installed in my used venv are: packages in environment at /home/vladimir/anaconda3/envs/py36: #
Updating packages seems to have removed the NameError. (numpy and sklearn specifically). Must have been a compatibility issue, after installing some other packages.
I'm glad at least one of you got this resolved. Hopefully refreshing/updating packages might work twice? I am honestly at a little bit of a loss here.
Getting the exact same error message here (descriptor 'get_metric' requires a 'hdbscan.dist_metrics.DistanceMetric' object but received a 'str') despite updating the packages.
Got the same error message on an Ubuntu virtual machine with python 2.7 and a windows PC with python 3.6.4, both running the latest version of anaconda and having installed HDBscan through conda-forge. I may try to install it another way tomorrow
Alright, I actually had some time so I tested that. On the same machine, the pip install hdbscan worked immediately (after I removed the conda-forge version). Hope it helps you narrow it down and/or to fix it for others
I also had this error, but it was only present in the conda-forge
installed version of hdbscan
. pip install
version of hdbscan
. I removed the conda-forge
version, ran pip install hdbsan
for my conda environment, and hdbscan
works find.
@linwoodc3 That's a little weird; the conda-forge version gets synced with the pip version regularly. Perhaps a conda upgrade umap-learn
would have doen the job? Regardless, you have a working version now, and that's what counts. Thanks for the report, I'll keep an eye out for something amiss like this somewhere along the line.
I just got this same error (descriptor 'get_metric' requires a 'hdbscan.dist_metrics.DistanceMetric' object but received a 'str'). I installed hdbscan just yesterday via pip. I did notice that when I tried to import it, it gave me an error about 'numpy.core.multiarray failed to import' but no reason why. So I imported numpy.core.multiarray manually, and then I was able to import hdbscan. Don't know whether that is a related problem. But attempting to fit some data that I had just fit with sklearn.cluster.DBSCAN failed with the above error when I tried to do it with hdbscan. I have python 2.7.13 and numpy 1.11.2. 'pip check' doesn't find any broken dependencies. What else can I try? I would really like to use hdbscan, as I have data whose clusters are certain to have variable density. Does hdbscan require python 3.x perhaps, along with all of the dependent versions of numpy, Cython, etc.?
Producing a simple dataframe via
I try to run HDBSCAN clustering with the default arguments
And get the following error
I tried explicitly specifying other metrics with metric = 'manhattan' etc argument, did not help