-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from tidymodels/upkeep-2024
Upkeep 2024
- Loading branch information
Showing
27 changed files
with
67 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Predict --------------------------------------- | ||
|
||
#' @export | ||
tidypredict_fit.glm <- function(model) { | ||
parsedmodel <- parse_model(model) | ||
build_fit_formula(parsedmodel) | ||
} | ||
|
||
# Parse model -------------------------------------- | ||
|
||
#' @export | ||
parse_model.glm <- function(model) parse_model_lm(model) | ||
|
||
# Intervals ----------------------------------------------- | ||
|
||
#' @export | ||
tidypredict_interval.glm <- function(model, interval = 0.95) { | ||
parsedmodel <- parse_model(model) | ||
te_interval_glm(parsedmodel, interval) | ||
} | ||
|
||
te_interval_glm <- function(parsedmodel, interval = 0.95) { | ||
intervals <- te_interval_lm(parsedmodel, interval) | ||
family <- parsedmodel$general$family | ||
link <- parsedmodel$general$link | ||
assigned <- 0 | ||
if (family == "gaussian" && link == "identity") { | ||
assigned <- 1 | ||
} | ||
if (assigned == 0) { | ||
cli::cli_abort("Combination of family and link are not supported for prediction intervals") | ||
} | ||
intervals | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.