Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/2622#issuecomment-58091578
@rezazadeh Could you update the example using `scopt` to parse parameters?
You can check other example code for its usage. We try to be consistent across
example code. It should take `--threshold` as a required parameter. For the
evaluation, we can do it distributively, for example:
~~~
val MAE = exact.entries.map { case MatrixEntry(i, j, u) =>
((i, j), u)
}.leftOuterJoin(
approx.entries.map { case MatrixEntry(i, j, v) =>
((i, j), v)
}).values.map {
case (u, Some(v)) =>
math.abs(u - v)
case (u, None) =>
math.abs(u)
}.mean()
~~~
I use MAE here but I'm not sure which metric matches the theory.
Btw, I created a JIRA to have a specialized version of exact similarity
computation, which doesn't require sampling. Let me know if you are interested
working on it: https://issues.apache.org/jira/browse/SPARK-3820
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]