MammadTavakoli opened a new pull request, #37128:
URL: https://github.com/apache/spark/pull/37128
In the spark there is an `LSH `function that use for KNN or search
similarity; `BucketedRandomProjectionLSH`. The usage of it is:
```
from pyspark.ml.feature import BucketedRandomProjectionLSH
brp = BucketedRandomProjectionLSH(
inputCol="features", outputCol="hashes", seed=12345, bucketLength=1.0
)
model = brp.fit(df)
model.approxSimilarityJoin(df, df1, 3.0, distCol="EuclideanDistance")
```
But I don't understand what is the usage of fit in this method. In this
example `BucketedRandomProjectionLSH` fit with `df` and `approxSimilarityJoin`
measures the distance between `df` and `df1`, that `df1` can be `df` too. what
happend if we use `df2` (other data frame) inested of `df`, that
`BucketedRandomProjectionLSH` fitted with that data frame?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]