benwtrent commented on issue #13350:
URL: https://github.com/apache/lucene/issues/13350#issuecomment-2137366217

   @jmazanec15 this is accounted for in the corrections. The moving from signed 
to unsigned is still just a linear transformation, we are not manually flipping 
signs, but instead doing a full linear scale.
   
   Assuming your vectors are in order that you provided `[[-6][-2][3][6]]`
   
   Their calculated dot-product corrections are `[18.0, -5.8750076, -35.787956, 
-54.0]`
   
   For query vector `[-5]` its correction is `11.95908`
   
   The overall quantile multiplier is `0.008928018`
   
   To calculate the corrected dot-product score `quantizedDotProduct * 
multiplier + queryCorrection + vectorCorrection`
   
   The raw dot-products (in order of the vectors)
   ```
   [30.0, 10.0, -15.0, -30.0]
   ```
   The quantized dot-products with corrections
   ```
   [29.95908, 10.208817, -14.499098, -29.568478]
   ```
   
   Of course, the quantized scores without corrections (thus not accounting for 
linear shift and breaking max-inner product score scaling)
   ```
   [0.0, 462.0, 1045.0, 1397.0]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to