Skip to content
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

reproducibility of tidypredict_fit snapshots for glm, lm, and ranger #107

Open
simonpcouch opened this issue May 9, 2022 · 0 comments
Open
Labels
upkeep maintenance, infrastructure, and similar

Comments

@simonpcouch
Copy link
Contributor

We attempted to transition some calls to expect_silent to expect_snapshot in conversion to testthat 3e in #105, but came across some inconsistencies in snapshots for glm, lm ranger tests.

The failures are shown in the check logs for c899210, but I'll paste them below in case those logs are deleted.

They arise from converting expect_silent to expect_snapshot at these lines and re-testing:

expect_silent(tidypredict_fit(pm))

expect_silent(tidypredict_fit(model4))

expect_silent(tidypredict_fit(model4))

dropdown: check logs

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure (test-ranger.R:48:3): Model can be saved and re-loaded ──────────────
Snapshot of code has changed:
old[2:172] vs new[2:168]
"  tidypredict_fit(pm)"
"Output"
"  [[1]]"
- "  case_when(Petal.Length < 2.6 ~ \"setosa\", Petal.Width >= 1.7 & "
- "      Sepal.Length < 6.25 & Petal.Length >= 2.6 ~ \"virginica\", "
- "      Petal.Length >= 5.05 & Sepal.Length >= 6.25 & Petal.Length >= "
- "          2.6 ~ \"virginica\", Petal.Length < 5.35 & Petal.Width < "
- "          1.7 & Sepal.Length < 6.25 & Petal.Length >= 2.6 ~ \"versicolor\", "
- "      Petal.Length >= 5.35 & Petal.Width < 1.7 & Sepal.Length < "
- "          6.25 & Petal.Length >= 2.6 ~ \"virginica\", Petal.Length < "
- "          4.85 & Petal.Length < 5.05 & Sepal.Length >= 6.25 & Petal.Length >= "
- "          2.6 ~ \"versicolor\", Sepal.Length < 6.5 & Petal.Length >= "
- "          4.85 & Petal.Length < 5.05 & Sepal.Length >= 6.25 & Petal.Length >= "
- "          2.6 ~ \"versicolor\", Sepal.Length >= 6.5 & Petal.Length >= "
- "          4.85 & Petal.Length < 5.05 & Sepal.Length >= 6.25 & Petal.Length >= "
- "          2.6 ~ \"versicolor\")"
+ "  case_when(Petal.Length < 2.45 ~ \"setosa\", Petal.Width < 1.45 & "
+ "      Petal.Width < 1.65 & Petal.Length >= 2.45 ~ \"versicolor\", "
+ "      Sepal.Length < 6.55 & Petal.Width >= 1.65 & Petal.Length >= "
+ "          2.45 ~ \"virginica\", Petal.Length < 4.95 & Petal.Width >= "
+ "          1.45 & Petal.Width < 1.65 & Petal.Length >= 2.45 ~ \"versicolor\", "
+ "      Petal.Width < 1.75 & Sepal.Length >= 6.55 & Petal.Width >= "
+ "          1.65 & Petal.Length >= 2.45 ~ \"versicolor\", Petal.Width >= "
+ "          1.75 & Sepal.Length >= 6.55 & Petal.Width >= 1.65 & Petal.Length >= "
+ "          2.45 ~ \"virginica\", Sepal.Length >= 6.15 & Petal.Length >= "
+ "          4.95 & Petal.Width >= 1.45 & Petal.Width < 1.65 & Petal.Length >= "
+ "          2.45 ~ \"virginica\", Sepal.Width < 2.45 & Sepal.Length < "
+ "          6.15 & Petal.Length >= 4.95 & Petal.Width >= 1.45 & Petal.Width < "
+ "          1.65 & Petal.Length >= 2.45 ~ \"virginica\", Sepal.Width >= "
+ "          2.45 & Sepal.Length < 6.15 & Petal.Length >= 4.95 & Petal.Width >= "
+ "          1.45 & Petal.Width < 1.65 & Petal.Length >= 2.45 ~ \"versicolor\")"
"  "
"  [[2]]"
- "  case_when(Petal.Width < 0.75 ~ \"setosa\", Petal.Width >= 1.75 & "
- "      Petal.Width >= 0.75 ~ \"virginica\", Petal.Width < 1.25 & Sepal.Width < "
- "      2.25 & Petal.Width < 1.75 & Petal.Width >= 0.75 ~ \"versicolor\", "
- "      Petal.Width >= 1.25 & Sepal.Width < 2.25 & Petal.Width < "
- "          1.75 & Petal.Width >= 0.75 ~ \"virginica\", Sepal.Length >= "
- "          7.05 & Sepal.Width >= 2.25 & Petal.Width < 1.75 & Petal.Width >= "
- "          0.75 ~ \"virginica\", Petal.Length >= 5.05 & Sepal.Length < "
- "          7.05 & Sepal.Width >= 2.25 & Petal.Width < 1.75 & Petal.Width >= "
- "          0.75 ~ \"virginica\", Sepal.Width >= 2.55 & Petal.Length < "
- "          5.05 & Sepal.Length < 7.05 & Sepal.Width >= 2.25 & Petal.Width < "
- "          1.75 & Petal.Width >= 0.75 ~ \"versicolor\", Sepal.Length >= "
- "          4.95 & Sepal.Width < 2.55 & Petal.Length < 5.05 & Sepal.Length < "
- "          7.05 & Sepal.Width >= 2.25 & Petal.Width < 1.75 & Petal.Width >= "
- "          0.75 ~ \"versicolor\", Petal.Length < 3.9 & Sepal.Length < "
- "          4.95 & Sepal.Width < 2.55 & Petal.Length < 5.05 & Sepal.Length < "
- "          7.05 & Sepal.Width >= 2.25 & Petal.Width < 1.75 & Petal.Width >= "
- "          0.75 ~ \"versicolor\", Petal.Length >= 3.9 & Sepal.Length < "
- "          4.95 & Sepal.Width < 2.55 & Petal.Length < 5.05 & Sepal.Length < "
- "          7.05 & Sepal.Width >= 2.25 & Petal.Width < 1.75 & Petal.Width >= "
- "          0.75 ~ \"virginica\")"
- "  "
- "  [[3]]"
- "  case_when(Petal.Length < 2.35 ~ \"setosa\", Petal.Length < 4.75 & "
- "      Petal.Length >= 2.35 ~ \"versicolor\", Petal.Length < 4.95 & "
- "      Petal.Width < 1.7 & Petal.Length >= 4.75 & Petal.Length >= "
- "      2.35 ~ \"versicolor\", Sepal.Length >= 6 & Petal.Width >= 1.7 & "
- "      Petal.Length >= 4.75 & Petal.Length >= 2.35 ~ \"virginica\", "
- "      Sepal.Width < 2.65 & Petal.Length >= 4.95 & Petal.Width < "
- "          1.7 & Petal.Length >= 4.75 & Petal.Length >= 2.35 ~ \"virginica\", "
- "      Sepal.Width >= 2.65 & Petal.Length >= 4.95 & Petal.Width < "
- "          1.7 & Petal.Length >= 4.75 & Petal.Length >= 2.35 ~ \"versicolor\", "
- "      Petal.Width < 1.85 & Sepal.Length < 6 & Petal.Width >= 1.7 & "
- "          Petal.Length >= 4.75 & Petal.Length >= 2.35 ~ \"versicolor\", "
- "      Petal.Width >= 1.85 & Sepal.Length < 6 & Petal.Width >= 1.7 & "
- "          Petal.Length >= 4.75 & Petal.Length >= 2.35 ~ \"virginica\")"
- "  "
- "  [[4]]"
- "  case_when(Petal.Width < 0.8 ~ \"setosa\", Petal.Width < 1.6 & Petal.Length < "
- "      4.75 & Petal.Width >= 0.8 ~ \"versicolor\", Petal.Width >= "
- "      1.6 & Petal.Length < 4.75 & Petal.Width >= 0.8 ~ \"virginica\", "
- "      Petal.Width >= 1.75 & Petal.Length >= 4.75 & Petal.Width >= "
- "          0.8 ~ \"virginica\", Petal.Length < 5.05 & Petal.Width < "
- "          1.75 & Petal.Length >= 4.75 & Petal.Width >= 0.8 ~ \"versicolor\", "
- "      Petal.Length >= 5.05 & Petal.Width < 1.75 & Petal.Length >= "
- "          4.75 & Petal.Width >= 0.8 ~ \"virginica\")"
- "  "
- "  [[5]]"
- "  case_when(Petal.Length < 2.45 ~ \"setosa\", Petal.Length < 4.9 & "
- "      Petal.Width < 1.75 & Petal.Length >= 2.45 ~ \"versicolor\", "
- "      Petal.Length >= 4.85 & Petal.Width >= 1.75 & Petal.Length >= "
- "          2.45 ~ \"virginica\", Petal.Width < 1.55 & Petal.Length >= "
- "          4.9 & Petal.Width < 1.75 & Petal.Length >= 2.45 ~ \"virginica\", "
- "      Petal.Width >= 1.55 & Petal.Length >= 4.9 & Petal.Width < "
- "          1.75 & Petal.Length >= 2.45 ~ \"versicolor\", Sepal.Width < "
- "          3.1 & Petal.Length < 4.85 & Petal.Width >= 1.75 & Petal.Length >= "
- "          2.45 ~ \"virginica\", Sepal.Width >= 3.1 & Petal.Length < "
- "          4.85 & Petal.Width >= 1.75 & Petal.Length >= 2.45 ~ \"versicolor\")"
- "  "
- "  [[6]]"
- "  case_when(Petal.Width < 0.8 & Sepal.Length < 5.75 ~ \"setosa\", "
- "      Sepal.Width >= 2.55 & Petal.Width >= 0.8 & Sepal.Length < "
- "          5.75 ~ \"versicolor\", Petal.Length < 4.75 & Sepal.Length < "
- "          6.35 & Sepal.Length >= 5.75 ~ \"versicolor\", Petal.Width < "
- "          1.55 & Sepal.Length >= 6.35 & Sepal.Length >= 5.75 ~ "
- "          \"versicolor\", Petal.Width >= 1.55 & Sepal.Length >= 6.35 & "
- "          Sepal.Length >= 5.75 ~ \"virginica\", Petal.Width < 1.35 & "
- "          Sepal.Width < 2.55 & Petal.Width >= 0.8 & Sepal.Length < "
- "          5.75 ~ \"versicolor\", Petal.Width >= 1.35 & Sepal.Width < "
- "          2.55 & Petal.Width >= 0.8 & Sepal.Length < 5.75 ~ \"virginica\", "
- "      Sepal.Length >= 6.05 & Petal.Length >= 4.75 & Sepal.Length < "
- "          6.35 & Sepal.Length >= 5.75 ~ \"virginica\", Petal.Width >= "
- "          1.85 & Sepal.Length < 6.05 & Petal.Length >= 4.75 & Sepal.Length < "
- "          6.35 & Sepal.Length >= 5.75 ~ \"virginica\", Petal.Width < "
- "          1.55 & Petal.Width < 1.85 & Sepal.Length < 6.05 & Petal.Length >= "
- "          4.75 & Sepal.Length < 6.35 & Sepal.Length >= 5.75 ~ \"virginica\", "
- "      Sepal.Length < 5.95 & Petal.Width >= 1.55 & Petal.Width < "
- "          1.85 & Sepal.Length < 6.05 & Petal.Length >= 4.75 & Sepal.Length < "
- "          6.35 & Sepal.Length >= 5.75 ~ \"versicolor\", Petal.Width < "
- "          1.7 & Sepal.Length >= 5.95 & Petal.Width >= 1.55 & Petal.Width < "
- "          1.85 & Sepal.Length < 6.05 & Petal.Length >= 4.75 & Sepal.Length < "
- "          6.35 & Sepal.Length >= 5.75 ~ \"versicolor\", Petal.Width >= "
- "          1.7 & Sepal.Length >= 5.95 & Petal.Width >= 1.55 & Petal.Width < "
- "          1.85 & Sepal.Length < 6.05 & Petal.Length >= 4.75 & Sepal.Length < "
- "          6.35 & Sepal.Length >= 5.75 ~ \"virginica\")"
- "  "
- "  [[7]]"
- "  case_when(Petal.Width < 1.55 & Sepal.Width < 2.8 & Sepal.Length < "
- "      5.55 ~ \"versicolor\", Petal.Width >= 1.55 & Sepal.Width < "
- "      2.8 & Sepal.Length < 5.55 ~ \"virginica\", Petal.Width < 1 & "
- "      Sepal.Width >= 2.8 & Sepal.Length < 5.55 ~ \"setosa\", Petal.Width >= "
- "      1 & Sepal.Width >= 2.8 & Sepal.Length < 5.55 ~ \"versicolor\", "
- "      Sepal.Width >= 3.55 & Petal.Length < 4.85 & Sepal.Length >= "
- "          5.55 ~ \"setosa\", Petal.Length >= 5.15 & Petal.Length >= "
- "          4.85 & Sepal.Length >= 5.55 ~ \"virginica\", Sepal.Length >= "
- "          6.05 & Sepal.Width < 3.55 & Petal.Length < 4.85 & Sepal.Length >= "
- "          5.55 ~ \"versicolor\", Petal.Width >= 1.75 & Petal.Length < "
- "          5.15 & Petal.Length >= 4.85 & Sepal.Length >= 5.55 ~ "
- "          \"virginica\", Petal.Width < 1.65 & Sepal.Length < 6.05 & "
- "          Sepal.Width < 3.55 & Petal.Length < 4.85 & Sepal.Length >= "
- "          5.55 ~ \"versicolor\", Sepal.Length >= 6.5 & Petal.Width < "
- "          1.75 & Petal.Length < 5.15 & Petal.Length >= 4.85 & Sepal.Length >= "
- "          5.55 ~ \"versicolor\", Sepal.Length < 5.95 & Petal.Width >= "
- "          1.65 & Sepal.Length < 6.05 & Sepal.Width < 3.55 & Petal.Length < "
- "          4.85 & Sepal.Length >= 5.55 ~ \"versicolor\", Sepal.Length >= "
- "          5.95 & Petal.Width >= 1.65 & Sepal.Length < 6.05 & Sepal.Width < "
- "          3.55 & Petal.Length < 4.85 & Sepal.Length >= 5.55 ~ \"virginica\", "
- "      Sepal.Width < 2.35 & Sepal.Length < 6.5 & Petal.Width < 1.75 & "
- "          Petal.Length < 5.15 & Petal.Length >= 4.85 & Sepal.Length >= "
- "          5.55 ~ \"virginica\", Sepal.Width < 2.75 & Sepal.Width >= "
- "          2.35 & Sepal.Length < 6.5 & Petal.Width < 1.75 & Petal.Length < "
- "          5.15 & Petal.Length >= 4.85 & Sepal.Length >= 5.55 ~ "
- "          \"versicolor\", Sepal.Width >= 2.75 & Sepal.Width >= 2.35 & "
- "          Sepal.Length < 6.5 & Petal.Width < 1.75 & Petal.Length < "
- "          5.15 & Petal.Length >= 4.85 & Sepal.Length >= 5.55 ~ "
- "          \"virginica\")"
- "  "
- "  [[8]]"
- "  case_when(Petal.Width < 0.7 ~ \"setosa\", Petal.Width < 1.65 & "
- "      Petal.Length < 4.75 & Petal.Width >= 0.7 ~ \"versicolor\", "
- "      Petal.Width >= 1.65 & Petal.Length < 4.75 & Petal.Width >= "
- "          0.7 ~ \"virginica\", Petal.Width >= 1.75 & Petal.Length >= "
- "          4.75 & Petal.Width >= 0.7 ~ \"virginica\", Sepal.Length >= "
- "          7.05 & Petal.Width < 1.75 & Petal.Length >= 4.75 & Petal.Width >= "
- "          0.7 ~ \"virginica\", Petal.Length < 4.95 & Sepal.Length < "
- "          7.05 & Petal.Width < 1.75 & Petal.Length >= 4.75 & Petal.Width >= "
- "          0.7 ~ \"versicolor\", Sepal.Length >= 6.5 & Petal.Length >= "
- "          4.95 & Sepal.Length < 7.05 & Petal.Width < 1.75 & Petal.Length >= "
- "          4.75 & Petal.Width >= 0.7 ~ \"versicolor\", Sepal.Length >= "
- "          6.05 & Sepal.Length < 6.5 & Petal.Length >= 4.95 & Sepal.Length < "
- "          7.05 & Petal.Width < 1.75 & Petal.Length >= 4.75 & Petal.Width >= "
- "          0.7 ~ \"virginica\", Sepal.Width < 2.45 & Sepal.Length < "
- "          6.05 & Sepal.Length < 6.5 & Petal.Length >= 4.95 & Sepal.Length < "
- "          7.05 & Petal.Width < 1.75 & Petal.Length >= 4.75 & Petal.Width >= "
- "          0.7 ~ \"virginica\", Sepal.Width >= 2.45 & Sepal.Length < "
- "          6.05 & Sepal.Length < 6.5 & Petal.Length >= 4.95 & Sepal.Length < "
- "          7.05 & Petal.Width < 1.75 & Petal.Length >= 4.75 & Petal.Width >= "
- "          0.7 ~ \"versicolor\")"
+ "  case_when(Sepal.Width < 2.8 & Sepal.Length < 5.45 ~ \"versicolor\", "
+ "      Petal.Length < 3.2 & Sepal.Width >= 2.8 & Sepal.Length < "
+ "          5.45 ~ \"setosa\", Petal.Length >= 3.2 & Sepal.Width >= "
+ "          2.8 & Sepal.Length < 5.45 ~ \"versicolor\", Petal.Length < "
+ "          2.75 & Petal.Width < 1.75 & Sepal.Length >= 5.45 ~ \"setosa\", "
+ "      Sepal.Width < 3.15 & Petal.Width >= 1.75 & Sepal.Length >= "
+ "          5.45 ~ \"virginica\", Sepal.Length < 6.25 & Petal.Length >= "
+ "          2.75 & Petal.Width < 1.75 & Sepal.Length >= 5.45 ~ \"versicolor\", "
+ "      Petal.Length < 5.05 & Sepal.Width >= 3.15 & Petal.Width >= "
+ "          1.75 & Sepal.Length >= 5.45 ~ \"versicolor\", Petal.Length >= "
+ "          5.05 & Sepal.Width >= 3.15 & Petal.Width >= 1.75 & Sepal.Length >= "
+ "          5.45 ~ \"virginica\", Petal.Length < 5.05 & Sepal.Length >= "
+ "          6.25 & Petal.Length >= 2.75 & Petal.Width < 1.75 & Sepal.Length >= "
+ "          5.45 ~ \"versicolor\", Petal.Length >= 5.05 & Sepal.Length >= "
+ "          6.25 & Petal.Length >= 2.75 & Petal.Width < 1.75 & Sepal.Length >= "
+ "          5.45 ~ \"virginica\")"
+ "  "
+ "  [[3]]"
+ "  case_when(Petal.Width < 0.75 ~ \"setosa\", Sepal.Length < 5.55 & "
+ "      Petal.Width >= 0.75 ~ \"versicolor\", Petal.Length < 4.85 & "
+ "      Sepal.Length >= 5.55 & Petal.Width >= 0.75 ~ \"versicolor\", "
+ "      Petal.Width >= 1.75 & Petal.Length >= 4.85 & Sepal.Length >= "
+ "          5.55 & Petal.Width >= 0.75 ~ \"virginica\", Petal.Length < "
+ "          5.35 & Petal.Width < 1.75 & Petal.Length >= 4.85 & Sepal.Length >= "
+ "          5.55 & Petal.Width >= 0.75 ~ \"versicolor\", Petal.Length >= "
+ "          5.35 & Petal.Width < 1.75 & Petal.Length >= 4.85 & Sepal.Length >= "
+ "          5.55 & Petal.Width >= 0.75 ~ \"virginica\")"
+ "  "
+ "  [[4]]"
+ "  case_when(Petal.Width < 0.8 & Sepal.Length < 5.45 ~ \"setosa\", "
+ "      Petal.Width >= 0.8 & Sepal.Length < 5.45 ~ \"versicolor\", "
+ "      Sepal.Width < 3.45 & Petal.Length < 4.75 & Sepal.Length >= "
+ "          5.45 ~ \"versicolor\", Sepal.Width >= 3.45 & Petal.Length < "
+ "          4.75 & Sepal.Length >= 5.45 ~ \"setosa\", Petal.Length >= "
+ "          5.15 & Petal.Length >= 4.75 & Sepal.Length >= 5.45 ~ "
+ "          \"virginica\", Sepal.Length >= 6.15 & Petal.Width < 1.75 & "
+ "          Petal.Length < 5.15 & Petal.Length >= 4.75 & Sepal.Length >= "
+ "          5.45 ~ \"versicolor\", Sepal.Width < 3.15 & Petal.Width >= "
+ "          1.75 & Petal.Length < 5.15 & Petal.Length >= 4.75 & Sepal.Length >= "
+ "          5.45 ~ \"virginica\", Sepal.Width >= 3.15 & Petal.Width >= "
+ "          1.75 & Petal.Length < 5.15 & Petal.Length >= 4.75 & Sepal.Length >= "
+ "          5.45 ~ \"versicolor\", Petal.Width < 1.55 & Sepal.Length < "
+ "          6.15 & Petal.Width < 1.75 & Petal.Length < 5.15 & Petal.Length >= "
+ "          4.75 & Sepal.Length >= 5.45 ~ \"virginica\", Petal.Width >= "
+ "          1.55 & Sepal.Length < 6.15 & Petal.Width < 1.75 & Petal.Length < "
+ "          5.15 & Petal.Length >= 4.75 & Sepal.Length >= 5.45 ~ "
+ "          \"versicolor\")"
+ "  "
+ "  [[5]]"
+ "  case_when(Petal.Width < 0.75 ~ \"setosa\", Petal.Width < 1.35 & "
+ "      Petal.Width < 1.75 & Petal.Width >= 0.75 ~ \"versicolor\", "
+ "      Sepal.Width < 3.1 & Petal.Width >= 1.75 & Petal.Width >= "
+ "          0.75 ~ \"virginica\", Sepal.Width < 2.65 & Petal.Width >= "
+ "          1.35 & Petal.Width < 1.75 & Petal.Width >= 0.75 ~ \"virginica\", "
+ "      Petal.Width >= 1.9 & Sepal.Width >= 3.1 & Petal.Width >= "
+ "          1.75 & Petal.Width >= 0.75 ~ \"virginica\", Petal.Width < "
+ "          1.55 & Sepal.Width >= 2.65 & Petal.Width >= 1.35 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.75 ~ \"versicolor\", Sepal.Length < "
+ "          6.55 & Petal.Width < 1.9 & Sepal.Width >= 3.1 & Petal.Width >= "
+ "          1.75 & Petal.Width >= 0.75 ~ \"versicolor\", Sepal.Length >= "
+ "          6.55 & Petal.Width < 1.9 & Sepal.Width >= 3.1 & Petal.Width >= "
+ "          1.75 & Petal.Width >= 0.75 ~ \"virginica\", Sepal.Width >= "
+ "          3.15 & Petal.Width >= 1.55 & Sepal.Width >= 2.65 & Petal.Width >= "
+ "          1.35 & Petal.Width < 1.75 & Petal.Width >= 0.75 ~ \"versicolor\", "
+ "      Petal.Length < 5.4 & Sepal.Width < 3.15 & Petal.Width >= "
+ "          1.55 & Sepal.Width >= 2.65 & Petal.Width >= 1.35 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.75 ~ \"versicolor\", Petal.Length >= "
+ "          5.4 & Sepal.Width < 3.15 & Petal.Width >= 1.55 & Sepal.Width >= "
+ "          2.65 & Petal.Width >= 1.35 & Petal.Width < 1.75 & Petal.Width >= "
+ "          0.75 ~ \"virginica\")"
+ "  "
+ "  [[6]]"
+ "  case_when(Petal.Width < 0.8 ~ \"setosa\", Petal.Width >= 1.75 & "
+ "      Petal.Width >= 0.8 ~ \"virginica\", Petal.Width < 1.65 & Petal.Length < "
+ "      4.95 & Petal.Width < 1.75 & Petal.Width >= 0.8 ~ \"versicolor\", "
+ "      Petal.Width >= 1.65 & Petal.Length < 4.95 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.8 ~ \"virginica\", Petal.Width < "
+ "          1.55 & Sepal.Length < 6.5 & Petal.Length >= 4.95 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.8 ~ \"virginica\", Petal.Width >= "
+ "          1.55 & Sepal.Length < 6.5 & Petal.Length >= 4.95 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.8 ~ \"versicolor\", Sepal.Length < "
+ "          6.95 & Sepal.Length >= 6.5 & Petal.Length >= 4.95 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.8 ~ \"versicolor\", Sepal.Length >= "
+ "          6.95 & Sepal.Length >= 6.5 & Petal.Length >= 4.95 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.8 ~ \"virginica\")"
+ "  "
+ "  [[7]]"
+ "  case_when(Petal.Length < 2.45 ~ \"setosa\", Petal.Length < 5.05 & "
+ "      Petal.Width < 1.75 & Petal.Length >= 2.45 ~ \"versicolor\", "
+ "      Petal.Length >= 4.85 & Petal.Width >= 1.75 & Petal.Length >= "
+ "          2.45 ~ \"virginica\", Sepal.Width < 2.75 & Petal.Length >= "
+ "          5.05 & Petal.Width < 1.75 & Petal.Length >= 2.45 ~ \"versicolor\", "
+ "      Sepal.Width >= 2.75 & Petal.Length >= 5.05 & Petal.Width < "
+ "          1.75 & Petal.Length >= 2.45 ~ \"virginica\", Sepal.Length < "
+ "          5.95 & Petal.Length < 4.85 & Petal.Width >= 1.75 & Petal.Length >= "
+ "          2.45 ~ \"versicolor\", Sepal.Length >= 5.95 & Petal.Length < "
+ "          4.85 & Petal.Width >= 1.75 & Petal.Length >= 2.45 ~ \"virginica\")"
+ "  "
+ "  [[8]]"
+ "  case_when(Petal.Width < 0.75 ~ \"setosa\", Sepal.Length >= 7.05 & "
+ "      Petal.Width < 1.75 & Petal.Width >= 0.75 ~ \"virginica\", Sepal.Width < "
+ "      3.15 & Petal.Width >= 1.75 & Petal.Width >= 0.75 ~ \"virginica\", "
+ "      Petal.Length < 5.05 & Sepal.Length < 7.05 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.75 ~ \"versicolor\", Petal.Length < "
+ "          4.95 & Sepal.Width >= 3.15 & Petal.Width >= 1.75 & Petal.Width >= "
+ "          0.75 ~ \"versicolor\", Petal.Length >= 4.95 & Sepal.Width >= "
+ "          3.15 & Petal.Width >= 1.75 & Petal.Width >= 0.75 ~ \"virginica\", "
+ "      Sepal.Width >= 2.75 & Petal.Length >= 5.05 & Sepal.Length < "
+ "          7.05 & Petal.Width < 1.75 & Petal.Width >= 0.75 ~ \"virginica\", "
+ "      Sepal.Width < 2.65 & Sepal.Width < 2.75 & Petal.Length >= "
+ "          5.05 & Sepal.Length < 7.05 & Petal.Width < 1.75 & Petal.Width >= "
+ "          0.75 ~ \"virginica\", Sepal.Width >= 2.65 & Sepal.Width < "
+ "          2.75 & Petal.Length >= 5.05 & Sepal.Length < 7.05 & Petal.Width < "
+ "          1.75 & Petal.Width >= 0.75 ~ \"versicolor\")"
"  "
"  [[9]]"
- "  case_when(Petal.Width >= 1.7 ~ \"virginica\", Petal.Length < 2.6 & "
- "      Petal.Width < 1.7 ~ \"setosa\", Sepal.Length < 6.25 & Petal.Length >= "
- "      2.6 & Petal.Width < 1.7 ~ \"versicolor\", Petal.Length < 5 & "
- "      Sepal.Length >= 6.25 & Petal.Length >= 2.6 & Petal.Width < "
- "      1.7 ~ \"versicolor\", Petal.Length >= 5 & Sepal.Length >= 6.25 & "
- "      Petal.Length >= 2.6 & Petal.Width < 1.7 ~ \"virginica\")"
+ "  case_when(Petal.Width < 0.8 ~ \"setosa\", Petal.Width < 1.7 & Petal.Length < "
+ "      4.85 & Petal.Width >= 0.8 ~ \"versicolor\", Sepal.Length < "
+ "      6.05 & Petal.Width >= 1.7 & Petal.Length < 4.85 & Petal.Width >= "
+ "      0.8 ~ \"versicolor\", Sepal.Length >= 6.05 & Petal.Width >= "
+ "      1.7 & Petal.Length < 4.85 & Petal.Width >= 0.8 ~ \"virginica\", "
+ "      Petal.Width >= 1.7 & Sepal.Width < 2.75 & Petal.Length >= "
+ "          4.85 & Petal.Width >= 0.8 ~ \"virginica\", Petal.Length >= "
+ "          5.05 & Sepal.Width >= 2.75 & Petal.Length >= 4.85 & Petal.Width >= "
+ "          0.8 ~ \"virginica\", Petal.Length < 5.35 & Petal.Width < "
+ "          1.7 & Sepal.Width < 2.75 & Petal.Length >= 4.85 & Petal.Width >= "
+ "          0.8 ~ \"versicolor\", Petal.Length >= 5.35 & Petal.Width < "
+ "          1.7 & Sepal.Width < 2.75 & Petal.Length >= 4.85 & Petal.Width >= "
+ "          0.8 ~ \"virginica\", Petal.Length < 4.95 & Petal.Length < "
+ "          5.05 & Sepal.Width >= 2.75 & Petal.Length >= 4.85 & Petal.Width >= "
+ "          0.8 ~ \"virginica\", Petal.Length >= 4.95 & Petal.Length < "
+ "          5.05 & Sepal.Width >= 2.75 & Petal.Length >= 4.85 & Petal.Width >= "
+ "          0.8 ~ \"versicolor\")"
"  "
"  [[10]]"
- "  case_when(Petal.Length < 2.35 ~ \"setosa\", Petal.Length >= 4.95 & "
- "      Petal.Length >= 2.35 ~ \"virginica\", Petal.Width < 1.65 & "
- "      Petal.Length < 4.95 & Petal.Length >= 2.35 ~ \"versicolor\", "
- "      Petal.Width >= 1.65 & Petal.Length < 4.95 & Petal.Length >= "
- "          2.35 ~ \"virginica\")"
+ "  case_when(Petal.Length >= 4.85 & Petal.Length >= 4.75 ~ \"virginica\", "
+ "      Petal.Length < 2.5 & Sepal.Length < 5.4 & Petal.Length < "
+ "          4.75 ~ \"setosa\", Petal.Length >= 2.5 & Sepal.Length < "
+ "          5.4 & Petal.Length < 4.75 ~ \"versicolor\", Petal.Width < "
+ "          0.7 & Sepal.Length >= 5.4 & Petal.Length < 4.75 ~ \"setosa\", "
+ "      Petal.Width >= 0.7 & Sepal.Length >= 5.4 & Petal.Length < "
+ "          4.75 ~ \"versicolor\", Sepal.Width >= 3.1 & Petal.Length < "
+ "          4.85 & Petal.Length >= 4.75 ~ \"versicolor\", Sepal.Length < "
+ "          6.5 & Sepal.Width < 3.1 & Petal.Length < 4.85 & Petal.Length >= "
+ "          4.75 ~ \"virginica\", Sepal.Length >= 6.5 & Sepal.Width < "
+ "          3.1 & Petal.Length < 4.85 & Petal.Length >= 4.75 ~ \"versicolor\")"
"  "

* Run `snapshot_accept('ranger')` to accept the change
* Run `snapshot_review('ranger')` to interactively review the change
── Failure (test_glm.R:30:3): tidypredict works when variable names are subset of other variables ──
Snapshot of code has changed:
old vs new
"Code"
"  tidypredict_fit(model4)"
"Output"
- "  1 - 1/(1 + exp(132.797404713083 + (wt * -78.468619565122) + (wt_sq * "
+ "  1 - 1/(1 + exp(132.797404713082 + (wt * -78.4686195651216) + "
- "      9.48372[241](https://github.com/tidymodels/tidypredict/runs/6344000050?check_suite_focus=true#step:6:241)378896) + (ifelse(char_cyl == \"cyl6\", 1, 0) * 17.4668465348677) + "
+ "      (wt_sq * 9.4837224137889) + (ifelse(char_cyl == \"cyl6\", 1, "
- "      (ifelse(char_cyl == \"cyl8\", 1, 0) * 8.63109418961669) + (ifelse(char_cyl_2 == "
+ "      0) * 17.4668465348676) + (ifelse(char_cyl == \"cyl8\", 1, 0) * "
- "      \"b\", 1, 0) * 0.93110542[275](https://github.com/tidymodels/tidypredict/runs/6344000050?check_suite_focus=true#step:6:275)6543) + (ifelse(char_cyl_2 == \"c\", "
+ "      8.6[310](https://github.com/tidymodels/tidypredict/runs/6344000050?check_suite_focus=true#step:6:310)9418961667) + (ifelse(char_cyl_2 == \"b\", 1, 0) * 0.9[311](https://github.com/tidymodels/tidypredict/runs/6344000050?check_suite_focus=true#step:6:311)05422756582) + "
- "      1, 0) * 16.349[319](https://github.com/tidymodels/tidypredict/runs/6344000050?check_suite_focus=true#step:6:319)6799229)))"
+ "      (ifelse(char_cyl_2 == \"c\", 1, 0) * 16.[349](https://github.com/tidymodels/tidypredict/runs/6344000050?check_suite_focus=true#step:6:349)3196799228)))"

@juliasilge juliasilge added the upkeep maintenance, infrastructure, and similar label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

No branches or pull requests

2 participants