Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ S3method(.censoring_weights_graf,model_fit)
S3method(augment,model_fit)
S3method(autoplot,glmnet)
S3method(autoplot,model_fit)
S3method(check_args,C5_rules)
S3method(check_args,bag_tree)
S3method(check_args,boost_tree)
S3method(check_args,cubist_rules)
S3method(check_args,decision_tree)
S3method(check_args,default)
S3method(check_args,discrim_flexible)
S3method(check_args,discrim_linear)
S3method(check_args,discrim_regularized)
S3method(check_args,linear_reg)
S3method(check_args,logistic_reg)
S3method(check_args,mars)
S3method(check_args,mlp)
S3method(check_args,multinom_reg)
S3method(check_args,nearest_neighbor)
S3method(check_args,pls)
S3method(check_args,poisson_reg)
S3method(check_args,rand_forest)
S3method(check_args,surv_reg)
S3method(check_args,survival_reg)
S3method(check_args,svm_linear)
S3method(check_args,svm_poly)
S3method(check_args,svm_rbf)
S3method(extract_fit_engine,model_fit)
S3method(extract_parameter_dials,model_spec)
S3method(extract_parameter_set_dials,model_spec)
Expand Down Expand Up @@ -180,6 +203,7 @@ export(bartMachine_interval_calc)
export(boost_tree)
export(case_weights_allowed)
export(cforest_train)
export(check_args)
export(check_empty_ellipse)
export(check_final_param)
export(condense_control)
Expand Down
1 change: 1 addition & 0 deletions R/bag_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ update.bag_tree <-

# ------------------------------------------------------------------------------

#' @export
check_args.bag_tree <- function(object) {
if (object$engine == "C5.0" && object$mode == "regression")
stop("C5.0 is classification only.", call. = FALSE)
Expand Down
1 change: 1 addition & 0 deletions R/boost_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ translate.boost_tree <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.boost_tree <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/c5_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ update.C5_rules <-

# make work in different places

#' @export
check_args.C5_rules <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/cubist_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ update.cubist_rules <-

# make work in different places

#' @export
check_args.cubist_rules <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/decision_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ translate.decision_tree <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.decision_tree <- function(object) {
if (object$engine == "C5.0" && object$mode == "regression")
rlang::abort("C5.0 is classification only.")
Expand Down
1 change: 1 addition & 0 deletions R/discrim_flexible.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ update.discrim_flexible <-

# ------------------------------------------------------------------------------

#' @export
check_args.discrim_flexible <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/discrim_linear.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ update.discrim_linear <-

# ------------------------------------------------------------------------------

#' @export
check_args.discrim_linear <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/discrim_regularized.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ update.discrim_regularized <-

# ------------------------------------------------------------------------------

#' @export
check_args.discrim_regularized <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/linear_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ update.linear_reg <-

# ------------------------------------------------------------------------------

#' @export
check_args.linear_reg <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/logistic_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ update.logistic_reg <-

# ------------------------------------------------------------------------------

#' @export
check_args.logistic_reg <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/mars.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ translate.mars <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.mars <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
4 changes: 4 additions & 0 deletions R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,14 @@ show_fit <- function(model, eng) {

# Check non-translated core arguments
# Each model has its own definition of this
#' @export
#' @keywords internal
#' @rdname add_on_exports
check_args <- function(object) {
UseMethod("check_args")
}

#' @export
check_args.default <- function(object) {
invisible(object)
}
Expand Down
1 change: 1 addition & 0 deletions R/mlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ translate.mlp <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.mlp <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/multinom_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ update.multinom_reg <-

# ------------------------------------------------------------------------------

#' @export
check_args.multinom_reg <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/nearest_neighbor.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ positive_int_scalar <- function(x) {

# ------------------------------------------------------------------------------

#' @export
check_args.nearest_neighbor <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/pls.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ update.pls <-

# ------------------------------------------------------------------------------

#' @export
check_args.pls <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/poisson_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ translate.poisson_reg <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.poisson_reg <- function(object) {

args <- lapply(object$args, rlang::eval_tidy)
Expand Down
1 change: 1 addition & 0 deletions R/rand_forest.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ translate.rand_forest <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.rand_forest <- function(object) {
# move translate checks here?
invisible(object)
Expand Down
1 change: 1 addition & 0 deletions R/surv_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ translate.surv_reg <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.surv_reg <- function(object) {

if (object$engine == "flexsurv") {
Expand Down
2 changes: 1 addition & 1 deletion R/survival_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ translate.survival_reg <- function(x, engine = x$engine, ...) {
x
}


#' @export
check_args.survival_reg <- function(object) {

if (object$engine == "flexsurv") {
Expand Down
1 change: 1 addition & 0 deletions R/svm_linear.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ translate.svm_linear <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.svm_linear <- function(object) {
invisible(object)
}
Expand Down
1 change: 1 addition & 0 deletions R/svm_poly.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ translate.svm_poly <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.svm_poly <- function(object) {
invisible(object)
}
Expand Down
1 change: 1 addition & 0 deletions R/svm_rbf.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ translate.svm_rbf <- function(x, engine = x$engine, ...) {

# ------------------------------------------------------------------------------

#' @export
check_args.svm_rbf <- function(object) {
invisible(object)
}
Expand Down
3 changes: 3 additions & 0 deletions man/add_on_exports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.