This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Force base weights to be the minimum only when the intercept is negative #12482
Force base weights to be the minimum only when the intercept is negative #12482
Changes from 2 commits
91510f4
22c924d
b27f42c
e218a30
e8db401
ce16b7c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you not use
ceil()
somewhere here to keep the logic simple?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.
ceil
will round the whole thing, e.g. let's assume you have a value of10.599999999
- using aceil
would round it to11
, while with this it will round it to10.6
, so the behavior would be quite differentThere 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.
This should actually be
>=
right?cc @koute @ggwpez
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.
Hmm.... well, I guess technically yes, you're right, although in practice I don't think linear interpolation's going to ever emit an intercept that's actually zero since the numbers would have to perfectly line up for that to happen? At least for the execution times. For other metrics I guess it could maybe happen? I'm not sure.
I'll put up a PR and change it to
>=
.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.
Probably does not matter much for floating point number 🤷♂️ but if you want to fix it, okay