Skip to content

[DRAFT] fix DBSCAN with CosineExpanded #5486

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

Draft
wants to merge 1 commit into
base: branch-23.08
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp/src/dbscan/vertexdeg/algo.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void launcher(const raft::handle_t& handle,
raft::linalg::NormType::L2Norm,
true,
stream,
[] __device__(value_t in) { return sqrtf(in); });
[] __device__(value_t in) { return (in > FLT_EPSILON) ? sqrtf(in) : FLT_EPSILON; });

/* Cast away constness because the output matrix for normalization cannot be of const type.
* Input matrix will be modified due to normalization.
Expand All @@ -80,7 +80,7 @@ void launcher(const raft::handle_t& handle,
k,
m,
true,
true,
false,
[] __device__(value_t mat_in, value_t vec_in) { return mat_in / vec_in; },
stream);

Expand All @@ -99,7 +99,7 @@ void launcher(const raft::handle_t& handle,
k,
m,
true,
true,
false,
[] __device__(value_t mat_in, value_t vec_in) { return mat_in * vec_in; },
stream);
} else {
Expand Down