Skip to content

Commit

Permalink
fix check() warning and notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cregouby committed Jun 14, 2024
1 parent 7d5ddaa commit 9b93bf3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Imports:
tune,
utils,
vctrs,
vip,
withr,
zeallot
Suggests:
Expand All @@ -55,6 +54,7 @@ Suggests:
testthat (>= 3.0.0),
tidymodels,
tidyverse,
vip,
visdat,
workflows,
yardstick
Expand Down
7 changes: 2 additions & 5 deletions R/parsnip.R
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ add_parsnip_tabnet <- function() {
#' @param mode A single character string for the type of model. Possible values
#' for this model are "unknown", "regression", or "classification".
#' @inheritParams tabnet_config
#' @inheritParams tabnet_fit
#'
#' @inheritSection tabnet_fit Threading
#' @seealso tabnet_fit
Expand All @@ -444,8 +445,7 @@ add_parsnip_tabnet <- function() {
#'
#' @export
tabnet <- function(mode = "unknown", cat_emb_dim = NULL, decision_width = NULL, attention_width = NULL,
num_steps = NULL, mask_type = NULL, mlp_hidden_multiplier = NULL, mlp_activation = NULL,
encoder_activation = NULL, num_independent = NULL, num_shared = NULL,
num_steps = NULL, mask_type = NULL, num_independent = NULL, num_shared = NULL,
num_independent_decoder = NULL, num_shared_decoder = NULL, penalty = NULL,
feature_reusage = NULL, momentum = NULL, epochs = NULL, batch_size = NULL,
virtual_batch_size = NULL, learn_rate = NULL, optimizer = NULL, loss = NULL,
Expand All @@ -471,9 +471,6 @@ tabnet <- function(mode = "unknown", cat_emb_dim = NULL, decision_width = NULL,
attention_width = rlang::enquo(attention_width),
num_steps = rlang::enquo(num_steps),
mask_type = rlang::enquo(mask_type),
mlp_hidden_multiplier = rlang::enquo(mlp_hidden_multiplier),
mlp_activation = rlang::enquo(mlp_activation),
encoder_activation = rlang::enquo(encoder_activation),
num_independent = rlang::enquo(num_independent),
num_shared = rlang::enquo(num_shared),
num_independent_decoder = rlang::enquo(num_independent_decoder),
Expand Down
4 changes: 2 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ autoplot.tabnet_fit <- function(object, ...) {

if ("checkpoint" %in% names(collect_metrics)) {
checkpoints <- collect_metrics %>%
dplyr::filter(checkpoint == TRUE, dataset == "train") %>%
dplyr::select(-checkpoint) %>%
dplyr::filter(.data$checkpoint == TRUE, dataset == "train") %>%
dplyr::select(-.data$checkpoint) %>%
dplyr::mutate(size = 2)
p +
ggplot2::geom_point(data = checkpoints, ggplot2::aes(x = epoch, y = loss, color = dataset, size = .data$size ))
Expand Down
9 changes: 6 additions & 3 deletions man/tabnet.Rd

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

0 comments on commit 9b93bf3

Please sign in to comment.