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

Error in execution #1

Closed
nitinnew opened this issue Nov 14, 2023 · 6 comments
Closed

Error in execution #1

nitinnew opened this issue Nov 14, 2023 · 6 comments
Labels
fixed The presented problem has been successfully fixed.

Comments

@nitinnew
Copy link

Hello!

I am encountering the following error while executing. Will be grateful if you may please check:-

Traceback (most recent call last):

File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 6, in <cell line: 6>
import dbcv

File "/usr/local/lib/python3.10/dist-packages/dbcv/init.py", line 1, in
from .core import dbcv

File "/usr/local/lib/python3.10/dist-packages/dbcv/core.py", line 35
return arr[*np.meshgrid(inds_a, inds_b)]
^
SyntaxError: invalid syntax

@FelSiq
Copy link
Owner

FelSiq commented Nov 14, 2023

Hi,

I was able to reproduce your error using Python 3.10. Weirdly enough, it hadn't happened when I tested using Python 3.11.

I'll check the exact cause of this behavior, and I'll upload a fix for this issue as soon as possible.

Thanks for letting me know about this issue,
Felipe.

@FelSiq
Copy link
Owner

FelSiq commented Nov 14, 2023

I've done a quickfix to the main branch regarding this issue. Please install the updated version, and you should be good to go this time.

If the problem persists, or you encounter any other issue, please let me know.

Felipe.

@FelSiq FelSiq closed this as completed Nov 14, 2023
@nitinnew
Copy link
Author

Thanks for the prompt update. I was able to get it running.

I wanted to check if you have had a look at the implementation at https://github.com/christopherjenness/DBCV.
While your implementation is much faster, i am getting different DBCV score with both.
Would it be possible for you to have a look please?

@FelSiq
Copy link
Owner

FelSiq commented Nov 14, 2023

Thanks for your response.

I indeed had looked into Christopher's implementation. In fact, it was that implementation that motivated me writing this package. In my opinion, that implementation was far too complex when compared to the original's paper description [1] (admittedly, mine was far more simpler before I implemented support for multiprocessing and variable precision bits for density computation), isn't vectorized at all (hence why it is so slow), and I didn't quite understand how his implementation handles noise (or even if it handles noise at all).

I'm aware that both implementation handle different results but, up to my personal interpretation of [1], I believe I followed correctly the description provided by the authors. Sadly, they don't provide an official implementation, so it's hard to tell apart who's right and who's wrong in this case.

Also note that I use the metric "sqeuclidean" (squared Euclidean distance) by default, not the Euclidean distance. That metric is mentioned in [1] as one valid possibility, and as far as I know there's no clear way to decide upfront which option is best for your analysis.

I suggest you to take a look into [1], analyze both implementations (Christopher's and mine), and draw your own conclusions. If you find any mistake in either implementation, please let us know.

EDIT (29/04/24): My current implementation is correct (tested against the original MATLAB implementation). See further discussion in #3.

Best regards,
Felipe.


[1] Moulavi, Davoud & Andretta Jaskowiak, Pablo & Campello, Ricardo & Zimek, Arthur & Sander, Joerg. (2014). Density-Based Clustering Validation. 10.1137/1.9781611973440.96.

@nitinnew
Copy link
Author

Thank you so much for your detailed inputs! And thanks for this implementation. I will examine the paper as well and reach out in case I need some more assistance on this.

Warm regards,

@FelSiq
Copy link
Owner

FelSiq commented Apr 29, 2024 via email

@FelSiq FelSiq added the fixed The presented problem has been successfully fixed. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed The presented problem has been successfully fixed.
Projects
None yet
Development

No branches or pull requests

2 participants