Skip to content

Commit

Permalink
Changes for CRAN resubmission.
Browse files Browse the repository at this point in the history
  • Loading branch information
moralapablo committed Jan 24, 2024
1 parent 43b0d00 commit b0dbff5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
22 changes: 0 additions & 22 deletions R/eval_poly.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,6 @@
#'
#' @seealso \code{eval_poly()} is also used in [predict.nn2poly()].
#'
#' @examples
#' # Single polynomial evaluation
#' # Create the polynomial 1 + (-1)·x_1 + 1·x_2 + 0.5·(x_1)^2 as a list
#' poly <- list()
#' poly$values <- c(1,-1,1,0.5)
#' poly$labels <- list(c(0),c(1),c(2),c(1,1))
#' # Create two observations, (x_1,x_2) = (1,2) and (x_1,x_2) = (3,1)
#' newdata <- rbind(c(1,2), c(3,1))
#' # Evaluate the polynomial on both observations
#' nn2poly:::eval_poly(poly = poly,newdata = newdata)
#'
#' # Multiple polynomial evaluation, with same terms but different coefficients
#' # Create the polynomial 1 + (-1)·x_1 + 1·x_2 + 0.5·(x_1)^2 as a list
#' poly <- list()
#' coeff_matrix <- cbind(c(1,-1,1,0.5),
#' c(2,-3,0,1.3))
#' poly$values <- coeff_matrix
#' poly$labels <- list(c(0),c(1),c(2),c(1,1))
#' # Create two observations, (x_1,x_2) = (1,2) and (x_1,x_2) = (3,1)
#' new_data <- rbind(c(1,2), c(3,1))
#' # Evaluate the polynomial on both observations
#' nn2poly:::eval_poly(poly = poly, newdata = newdata)
eval_poly <- function(poly, newdata) {

# Remove names and transform into matrix (variables as columns)
Expand Down
6 changes: 3 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Initial release
## Resubmission

This package implements a method that builds the coefficients of a polynomial
model that performs almost equivalently as a given MLP neural network.
1. Examples with unexported functions have been removed.
2. Examples using `\dontrun` are required as they use `keras` and `torch`, which require an interactive setup.

## Test environments

Expand Down

0 comments on commit b0dbff5

Please sign in to comment.