Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Branch 2.2 #19070
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
Uh oh!
There was an error while loading. Please reload this page.
Branch 2.2 #19070
Changes from 1 commit
4fcd52b3aad598cfd1bf041d8d21af1ff8b50dba30c4b16dc81f63c8a575532a0bf5c42fd6138d8328d8ddc199e5e9541a06c985cdbb068fd20c64600dee39ee9d597e936a961d1072483aeac9c59ad42b7a2a162405afcae65d303f82d65e0aa239b52a06d8896c4e9cbf39fe01f1f2022a4955ae1c657a21de9289dd17fafe283f99456b92837ae2b59ed430922defc799d739f7665f2408bd25e87d8dc51be126640a23b79e4cf6730a75fdc7d8287440d3cad66e3686c2ef59f9a3a607a2614fda6f4ab7b826a4e023b81a7024cba3b5bb3d90025cc800ae00d49f36c3ee7f35f5b9a4a8e1cc5dbd50c422796c628e7b560c97377cfa8478874ec8bbab6acd44811388fdd421d8ec3f93d079a4341b2f5eaa902cf1783f6812c714153c869af5b815a0820b0be4726003dea4d78e4e67739492f7c8fa6b7875580ecfd48a843bdae1a9824836be039c4652bc2c15220943d53212c342cc8309bdc83562651193dda682e02e063af4f89cb5504f676ee41fa585c879909be3653e6f1d3deeb38747f8ec0d4accd3c79b7fab070cf7fcdec7b50736e329beacf10fa88bf7f1e514a7e6b8b80f662e442ee883498529c04f198e3a06ef7a5bd625734b99c0e9b6749ba9d29808f1602673394b06a3088d296c04f1ad44ab5d8e3a4a970f68c17a04b920cf5118de67e3c6ba647d16e2628b08fd029a0be2a2c7b2185fddf46fd39eadb21b67770fd2a6e1081c4e53a4e576fd4cab128487d0b1c9a64f108c8d7855964332b3bfad9d40fd0cea05edf4edcd9fb399aa01cb6fc8939eba30cf0719bbfe3ba81cb43698e85ce60ef98fd83bdb0499ce551df061fd5a0a76f4c212ee86cd3c0308bce09949fed88dccdada403b962ca13de5ec339c91191b1bfd1a806b2ef09379031df6cd3524a9bac66fa6bde2062b9174543479e580567c60d7397f904467ee8d690f4911bcfa2af9aae8e841bc2f098aaec7a04def4f0eb0c43f9c84fa92a7ba1c119986609a9e87ffcad0233147446be3f6d56d23ca55eac909496406eb1c7b9807748bacd3d9c8e62f1accc8f5ede0d2a96975fdea6426c2a38a0f640e9526087f236b2f4a5853672b4bd790d4ef2f59bb7eb59529b2917fe66a6a9944d10c9dc14054ff50f86e1fb1b5f01f7c4867da8fbf9afab9a342cc2a49968de0848df14304d0b781a1f808cb06a9ae7c969876821182478eb1b5a7f10c683663098dcb606dc1File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…ance generate negative result Because of numerical error, MultivariateOnlineSummarizer.variance is possible to generate negative variance. **This is a serious bug because many algos in MLLib** **use stddev computed from** `sqrt(variance)` **it will generate NaN and crash the whole algorithm.** we can reproduce this bug use the following code: ``` val summarizer1 = (new MultivariateOnlineSummarizer) .add(Vectors.dense(3.0), 0.7) val summarizer2 = (new MultivariateOnlineSummarizer) .add(Vectors.dense(3.0), 0.4) val summarizer3 = (new MultivariateOnlineSummarizer) .add(Vectors.dense(3.0), 0.5) val summarizer4 = (new MultivariateOnlineSummarizer) .add(Vectors.dense(3.0), 0.4) val summarizer = summarizer1 .merge(summarizer2) .merge(summarizer3) .merge(summarizer4) println(summarizer.variance(0)) ``` This PR fix the bugs in `mllib.stat.MultivariateOnlineSummarizer.variance` and `ml.stat.SummarizerBuffer.variance`, and several places in `WeightedLeastSquares` test cases added. Author: WeichenXu <[email protected]> Closes #19029 from WeichenXu123/fix_summarizer_var_bug. (cherry picked from commit 0456b40) Signed-off-by: Sean Owen <[email protected]>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing