-
Notifications
You must be signed in to change notification settings - Fork 95
[Feature] Add upper bound parameter for min_max normalization technique #1431
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
[Feature] Add upper bound parameter for min_max normalization technique #1431
Conversation
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
This PR is currently in draft state as I still need to add unit tests for the combination of lower and upper bound score calculations and integration tests for multiple different scenarios. |
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.
Is there a combined bounds test for scenarios with both upper and lower bounds applied simultaneously.
If it's not there please add something like this
@Test
public void testCombinedBounds_whenBothUpperAndLowerBounds_thenSuccessful() {
Map<String, Object> params = Map.of(
"lower_bounds", List.of(Map.of("mode", "apply", "min_score", 0.2)),
"upper_bounds", List.of(Map.of("mode", "apply", "max_score", 0.8))
);
// test and assert
}
...a/org/opensearch/neuralsearch/processor/normalization/MinMaxScoreNormalizationTechnique.java
Show resolved
Hide resolved
src/main/java/org/opensearch/neuralsearch/processor/normalization/bounds/UpperBound.java
Show resolved
Hide resolved
That's one of the cases that I still need to add, described in my comment above. Will add in a future commit |
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
Looking into failing tests |
Signed-off-by: Ryan Bogan <[email protected]>
Rebase with main had caused a duplicate lower bounds clause to be added to the test search pipeline during the IT. Fixed now |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1431 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Ryan Bogan <[email protected]>
src/main/java/org/opensearch/neuralsearch/processor/normalization/bounds/ScoreBound.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ryan Bogan <[email protected]>
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.
Looks good, thank you @ryanbogan
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.
Looks clean. Few comments
...a/org/opensearch/neuralsearch/processor/normalization/MinMaxScoreNormalizationTechnique.java
Outdated
Show resolved
Hide resolved
...a/org/opensearch/neuralsearch/processor/normalization/MinMaxScoreNormalizationTechnique.java
Outdated
Show resolved
Hide resolved
...a/org/opensearch/neuralsearch/processor/normalization/MinMaxScoreNormalizationTechnique.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorIT.java
Show resolved
Hide resolved
src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java
Show resolved
Hide resolved
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
...a/org/opensearch/neuralsearch/processor/normalization/MinMaxScoreNormalizationTechnique.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ryan Bogan <[email protected]>
Signed-off-by: Ryan Bogan <[email protected]>
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.
Looks good, thanks Ryan
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.
Looks much cleaner with a minor comment
...a/org/opensearch/neuralsearch/processor/normalization/MinMaxScoreNormalizationTechnique.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ryan Bogan <[email protected]>
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.
Looks good. Thanks for addressing comments
Description
Adds upper bound parameter for min_max normalization technique
Related Issues
Resolves #1210
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.