-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow to use a relative score threshold, which can detect identical points passed to FPS #129
Allow to use a relative score threshold, which can detect identical points passed to FPS #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall there's still some messy edits in here -- most of my comments are "Why is this change part of this PR?"
I think this might be a good use for the score_threshold
parameter, what do you think?
The issue with thresholding is that it works using absolute values (as far as I understand); and here I would like to use relative values (i.e. stop when the score goes below a fraction of the first selection). |
One quick comment: I wouldn't throw an error if the same points are given
as input, only if one starts selecting identical points.
Eliminating duplicates might be one of the reasons to use FPS in the first
place.
Michele
…On Fri, 13 May 2022 at 17:25, Guillaume Fraux ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In examples/PlotLFRE.ipynb
<#129 (comment)>
:
> @@ -140,7 +140,7 @@
"ax34.set_title(r\"$X^-$ LFRE(3-body, 4-body)\")\n",
"ax43.set_title(r\"$X^-$ LFRE(4-body, 3-body)\")\n",
"\n",
- "cbar = fig.colorbar(pcm, ax=(ax34, ax43), label=\"LFRE\", location=\"bottom\")\n",
+ "cbar = fig.colorbar(pcm, ax=[ax34, ax43], label=\"LFRE\", location=\"bottom\")\n",
recent versions of matplotlib explicitly checks if this is a list when
plotting
—
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIREZ5JTS6GIVSOGAPZD4DVJZX5ZANCNFSM5U6RWGNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The PR title was not very clear, but that's exactly what the code is doing: trying to detect identical point being selected & raising an error in this case. |
5780576
to
4afb616
Compare
4afb616
to
7b9b775
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I am good with this bar a few thoughts.
- I think it should be
score_threshold_type
, notscore_threshold_kind
. Kind is a bit of an atypical word to use in this context. - I changed the docstring for clarity (this would need to be propagated throughout).
7b9b775
to
bff8d2c
Compare
@rosecers is this good to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to approve once there is a corresponding test!
This allows to stop selection early when identical points are fed to FPS or another selector by using something like score_threshold=1e-12 and score_threshold_type="relative".
bff8d2c
to
6038ace
Compare
Fixes #128
I'm not sure if this is the best approach to do so, but I think this is a case we want to detect automatically by default.
Score thresholding seems like it would be useful here as well, but since it works using absolute values, we can not enable it by default without knowing about the magnitude of features.
I could also modify score thresholding to work with relative scores, and use that instead.