fix reg equation and optimizer e-notation#445
Conversation
|
can you fix the test? Or maybe just a rebase since the tests in your last PR that we merged yesterday ran fine. |
There was a problem hiding this comment.
Pull request overview
Fixes formatting issues in the DOE analysis output, targeting incorrect regression-equation rendering and scientific-notation (“e-notation”) leakage in Response Optimizer results (per external-issues/#4).
Changes:
- Adjust regression equation string construction to use
formatC()rather thanround()when embedding coefficients. - Rework Response Optimizer “Solution” and “Optimization Plot Summary” tables to explicitly define predictor + fitted-response columns and to populate them without
cbind()coercion.
R/doeAnalysis.R
Outdated
| tb$addColumnInfo(name = "desi", title = "Composite desirability", type = "number") | ||
| for (pred in allPredictors) { | ||
| predType <- if (pred %in% continuousPredictors) "number" else "string" | ||
| tb$addColumnInfo(name = pred, title = pred, type = predType) | ||
| } | ||
| for (dep in roDependent) | ||
| tb$addColumnInfo(name = paste0(dep, " fit"), title = paste0(dep, " fit"), type = "number") |
|
also I am not sure of the copilot notes are justified |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
a9366cd to
7546f6b
Compare
There was a problem hiding this comment.
Pull request overview
Fixes DOE regression equation formatting and improves Response Optimizer table column definitions to address display issues reported in external issue #4.
Changes:
- Updated regression equation string construction to use
formatC()(aim: preserve small coefficients via scientific notation). - Reworked Response Optimizer “Solution” and “Optimization Plot Summary” tables to explicitly add predictor + fitted-response columns instead of relying on
cbind()side-effects.
|
looking at the failed tests, it seems like original values are better than the new ones. |
juliuspfadt
left a comment
There was a problem hiding this comment.
Looks good. Just the test should be passing.
juliuspfadt
left a comment
There was a problem hiding this comment.
oopsie, meant to request changes
|
ehh yea i'm currently working on this! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #445 +/- ##
==========================================
+ Coverage 84.86% 84.94% +0.07%
==========================================
Files 18 18
Lines 9953 9975 +22
==========================================
+ Hits 8447 8473 +26
+ Misses 1506 1502 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fix https://github.com/jasp-stats/external-issues/issues/4