Github user Yunni commented on the issue:

    https://github.com/apache/spark/pull/15148
  
    @jkbradley I agree with most of your comments above. And I would like to 
suggest the following:
     - I would recommend a more intuitive name like `HyperplaneProjection` 
instead of `PStableHashing` if we adopt the LSH function @sethah suggested.
     - `x.toDense.values.zip(y.toDense.values).map(pair => pair._1 == 
pair._2).sum / x.size` is AND-amplification. I think we should use 
OR-amplification here. I have already made a pull request to fix the issue in 
#15800.
     - I think for MinHash, multi-probing NN Search is either single probing or 
full scan.
     - Here is my reference for Multi-probing: 
http://www.cs.princeton.edu/cass/papers/mplsh_vldb07.pdf
    
    @sethah @karlhigley Now I see your LSH function for Euclidean distance is 
the AND-amplification of what I have implemented. 
    - Do you have any reference for compound AND/OR-amplification? I see this 
is not always working without assumptions on distance threshold and 
sensitivity, for example, `(0.6, 0.4)` => `(0.426, 0.098)` for `L = 4, d = 4`, 
and `(0.8, 0.2)` => `(0.678, 0.000)` for `L = 10, d = 10`
    - For the schema of `transform()`, I think we either add a generic type for 
the output column in LSH class or change the output type to `Array[Vector]`. I 
would recommend the latter way because (1) it's very easy to explode the array 
to get what @sethah suggested (2) The type of output column still needs to be 
spark sql compatible, which is not so generic.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to