-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26351][mllib]Update doc and minor correction in the mllib evaluation metrics #23589
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
Conversation
|
Test build #101412 has finished for PR 23589 at commit
|
|
Jenkins, retest this please |
|
Test build #101414 has finished for PR 23589 at commit
|
|
Jenkins, retest this please |
|
Test build #101423 has finished for PR 23589 at commit
|
|
Test build #101430 has finished for PR 23589 at commit
|
docs/mllib-evaluation-metrics.md
Outdated
| </td> | ||
| <td> | ||
| $p(k)=\frac{1}{M} \sum_{i=0}^{M-1} {\frac{1}{k} \sum_{j=0}^{\text{min}(\left|D\right|, k) - 1} rel_{D_i}(R_i(j))}$ | ||
| $p(k)=\frac{1}{M} \sum_{i=0}^{M-1} {\frac{1}{k} \sum_{j=0}^{\text{min}(\left|R_i\right|, k) - 1} rel_{D_i}(R_i(j))}$ |
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.
Although we usually have k <= |D| and k <= |R_i|, I agree that this is technically what must have been meant. How about using Q here instead of |R_i|? it was already used in the following formula. You can change both, sure, either way, as long as they're consistent.
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.
Actually the Q will vary with i, that is why I gave the notation |R_i|.
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.
Maybe; it could be the same for all users, or not. The documentation above this suggests there are equal numbers of recommended and relevant docs for each user (Q and N) but at least, it will almost never be true that |D_i| is the same for all users. Q could well be a constant.
But the implementation doesn't assume that and it's not necessary to, so I might even just remove the references to Q and N, or label them "Q_i" and "N_i" if you really want to be complete.
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.
Thanks. updated.
mllib/src/main/scala/org/apache/spark/mllib/evaluation/RankingMetrics.scala
Outdated
Show resolved
Hide resolved
542d687 to
60bec8e
Compare
60bec8e to
2003599
Compare
|
Thank you @srowen for the review. |
|
Test build #101434 has finished for PR 23589 at commit
|
|
Test build #101435 has finished for PR 23589 at commit
|
docs/mllib-evaluation-metrics.md
Outdated
| </td> | ||
| <td> | ||
| $p(k)=\frac{1}{M} \sum_{i=0}^{M-1} {\frac{1}{k} \sum_{j=0}^{\text{min}(\left|D\right|, k) - 1} rel_{D_i}(R_i(j))}$ | ||
| $p(k)=\frac{1}{M} \sum_{i=0}^{M-1} {\frac{1}{k} \sum_{j=0}^{\text{min}(\left|R_i\right|, k) - 1} rel_{D_i}(R_i(j))}$ |
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.
Maybe; it could be the same for all users, or not. The documentation above this suggests there are equal numbers of recommended and relevant docs for each user (Q and N) but at least, it will almost never be true that |D_i| is the same for all users. Q could well be a constant.
But the implementation doesn't assume that and it's not necessary to, so I might even just remove the references to Q and N, or label them "Q_i" and "N_i" if you really want to be complete.
|
Test build #101439 has finished for PR 23589 at commit
|
…luation metrics ## What changes were proposed in this pull request? Currently, there are some minor inconsistencies in doc compared to the code. In this PR, I am correcting those inconsistencies. 1) Links related to the evaluation metrics in the docs are not working 2) Minor correction in the evaluation metrics formulas in docs. ## How was this patch tested? NA Closes #23589 from shahidki31/docCorrection. Authored-by: Shahid <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 9a30e23) Signed-off-by: Sean Owen <[email protected]>
…luation metrics ## What changes were proposed in this pull request? Currently, there are some minor inconsistencies in doc compared to the code. In this PR, I am correcting those inconsistencies. 1) Links related to the evaluation metrics in the docs are not working 2) Minor correction in the evaluation metrics formulas in docs. ## How was this patch tested? NA Closes #23589 from shahidki31/docCorrection. Authored-by: Shahid <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 9a30e23) Signed-off-by: Sean Owen <[email protected]>
|
Merged to master/2.4/2.3 |
|
Thank you @srowen |
…luation metrics ## What changes were proposed in this pull request? Currently, there are some minor inconsistencies in doc compared to the code. In this PR, I am correcting those inconsistencies. 1) Links related to the evaluation metrics in the docs are not working 2) Minor correction in the evaluation metrics formulas in docs. ## How was this patch tested? NA Closes apache#23589 from shahidki31/docCorrection. Authored-by: Shahid <[email protected]> Signed-off-by: Sean Owen <[email protected]>
…luation metrics ## What changes were proposed in this pull request? Currently, there are some minor inconsistencies in doc compared to the code. In this PR, I am correcting those inconsistencies. 1) Links related to the evaluation metrics in the docs are not working 2) Minor correction in the evaluation metrics formulas in docs. ## How was this patch tested? NA Closes apache#23589 from shahidki31/docCorrection. Authored-by: Shahid <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 9a30e23) Signed-off-by: Sean Owen <[email protected]>
…luation metrics ## What changes were proposed in this pull request? Currently, there are some minor inconsistencies in doc compared to the code. In this PR, I am correcting those inconsistencies. 1) Links related to the evaluation metrics in the docs are not working 2) Minor correction in the evaluation metrics formulas in docs. ## How was this patch tested? NA Closes apache#23589 from shahidki31/docCorrection. Authored-by: Shahid <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 9a30e23) Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
Currently, there are some minor inconsistencies in doc compared to the code. In this PR, I am correcting those inconsistencies.
How was this patch tested?
NA