Skip to content

Commit

Permalink
change area field class to numeric. return full tuned grid without sp…
Browse files Browse the repository at this point in the history
…lits.
  • Loading branch information
emmamendelsohn committed May 6, 2024
1 parent af81ba4 commit 095ed9d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion R/model_tune.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ model_tune <- function(wf, splits, grid) {
control = tune::control_grid(verbose = TRUE)
)

tune::show_best(tuned_grid, metric = "brier_class")
list(obj_class = class(tuned_grid), obj_attributes = attributes(tuned_grid), tuned_grid= tuned_grid |> select(-splits))

# tune::show_best(tuned_grid, metric = "brier_class")

}
3 changes: 2 additions & 1 deletion _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ model_targets <- tar_plan(
rvf_outbreaks,
by = join_by(date, shapeName)) |>
mutate(outbreak_30 = factor(replace_na(outbreak_30, FALSE))) |>
left_join(rsa_polygon_spatial_weights, by = "shapeName")
left_join(rsa_polygon_spatial_weights, by = "shapeName") |>
mutate(area = as.numeric(area))
),

# Splitting --------------------------------------------------
Expand Down
11 changes: 6 additions & 5 deletions _targets/meta/meta

Large diffs are not rendered by default.

0 comments on commit 095ed9d

Please sign in to comment.