Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cran v0.3.1 #15

Merged
merged 4 commits into from
Nov 25, 2024
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
3 changes: 2 additions & 1 deletion R/Converter.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ Converter <- R6Class("Converter",
#' torch-converted model ([ConvertedModel]) is created and stored in
#' the field `model`.
#'
#' @param model ([`nn_sequential`], \code{\link[keras]{keras_model}},
#' @param model (\code{\link[torch]{nn_sequential}},
#' \code{\link[keras]{keras_model}},
#' \code{\link[neuralnet]{neuralnet}} or `list`)\cr
#' A trained neural network for classification or regression
#' tasks to be interpreted. Only models from the following types or
Expand Down
3 changes: 2 additions & 1 deletion R/DeepLift.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ DeepSHAP <- R6Class(
#' another variant is implemented, which treats a MaxPooling layer as an
#' AveragePooling layer in the backward pass only, leading to an uniform
#' distribution of the upper-layer contribution to the lower layer.\cr
#' @param data_ref ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param data_ref ([`array`], [`data.frame`],
#' \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The reference data which is used to estimate the conditional expectation.
#' These must have the same format as the input data of the passed model to
#' the converter object. This means either
Expand Down
4 changes: 2 additions & 2 deletions R/GradienBased.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ IntegratedGradient <- R6Class(
#' @param n (`integer(1)`)\cr
#' Number of steps for the approximation of the integration path along
#' \eqn{\alpha} (default: \eqn{50}).\cr
#' @param x_ref ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param x_ref ([`array`], [`data.frame`], \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The reference input for the IntegratedGradient method. This value
#' must have the same format as the input data of the passed model to the
#' converter object. This means either
Expand Down Expand Up @@ -723,7 +723,7 @@ ExpectedGradient <- R6Class(
#' Number of samples from the distribution of reference values and number
#' of samples for the approximation of the integration path along
#' \eqn{\alpha} (default: \eqn{50}).\cr
#' @param data_ref ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param data_ref ([`array`], [`data.frame`], \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The reference inputs for the ExpectedGradient method. This value
#' must have the same format as the input data of the passed model to the
#' converter object. This means either
Expand Down
20 changes: 11 additions & 9 deletions R/innsight_ggplot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ NULL
#' S4 class for ggplot2-based plots
#'
#' The S4 class `innsight_ggplot2` visualizes the results of the methods
#' provided from the package `innsight` using [ggplot2]. In addition, it
#' allows easier analysis of the results and modification of the
#' provided from the package `innsight` using [ggplot2][ggplot2::ggplot2]. In
#' addition, it allows easier analysis of the results and modification of the
#' visualization by basic generic functions. The individual slots are for
#' internal use only and should not be modified.
#'
Expand All @@ -23,11 +23,12 @@ NULL
#'
#' @details
#'
#' This S4 class is a simple extension of a [ggplot2] object that enables
#' a more detailed analysis of the results and a way to visualize the results
#' of models with multiple input layers (e.g., images and tabular data).
#' The distinction between one and multiple input layers decides the behavior
#' of this class, and this information is stored in the slot `multiplot`.
#' This S4 class is a simple extension of a [ggplot2][ggplot2::ggplot2] object
#' that enables a more detailed analysis of the results and a way to visualize
#' the results of models with multiple input layers (e.g., images and tabular
#' data). The distinction between one and multiple input layers decides the
#' behavior of this class, and this information is stored in the slot
#' `multiplot`.
#'
#' ## One input layer (`multiplot = FALSE`)
#'
Expand Down Expand Up @@ -187,8 +188,9 @@ setMethod(
#' Generic add function for `innsight_ggplot2`
#'
#' This generic add function allows to treat an instance of [`innsight_ggplot2`]
#' as an ordinary plot object of [`ggplot2`]. For example geoms, themes and
#' scales can be added as usual (see [`ggplot2::+.gg`] for more information).\cr \cr
#' as an ordinary plot object of [ggplot2][ggplot2::ggplot2]. For example geoms,
#' themes and scales can be added as usual (see [`ggplot2::+.gg`] for more
#' information).\cr \cr
#' **Note:** If `e1` represents a multiplot (i.e., `e1@mulitplot = TRUE`),
#' `e2` is added to each individual plot. If only specific plots need to be
#' changed, the generic assignment function should be used (see
Expand Down
4 changes: 2 additions & 2 deletions R/innsight_sugar.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @template param-converter
#' @template param-data_ref-agnostic
#'
#' @param model ([`nn_sequential`], \code{\link[keras]{keras_model}},
#' @param model (\code{\link[torch]{nn_sequential}}, \code{\link[keras]{keras_model}},
#' \code{\link[neuralnet]{neuralnet}} or `list`)\cr
#' A trained neural network for classification or regression
#' tasks to be interpreted. Only models from the following types or
Expand All @@ -40,7 +40,7 @@
#' \code{\link[neuralnet]{neuralnet}} or [`Converter`],
#' these have already been pre-implemented and do not need to be
#' specified.\cr
#' @param data ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param data ([`array`], [`data.frame`], \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The data to which the method is to be applied. These must
#' have the same format as the input data of the passed model to the
#' converter object. This means either
Expand Down
31 changes: 10 additions & 21 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ after publication on CRAN.
* GitHub Actions (windows): release
* Github Actions (macOS): release

**Note:** There is currently something wrong with the image on MacOS, which is
why the GitHub Actions workflow failed, but this is unrelated to the package
(see [here](https://forum.posit.co/t/r-cmd-check-fails-on-macos-latest-release-r-lib-actions-setup-r-v2/195084)
for details).

#### R CMD check results

There were no errors or warnings only one note which is not related to our
Expand All @@ -30,28 +35,12 @@ of the authors of torch (see torch
and disabled their execution on CRAN.

### Test environments without LibTorch
- winbuilder Windows Server 2022, R-devel, 64 bit
- winbuilder Windows Server 2022, R-release, 64 bit
- winbuilder Windows Server 2022, R-oldrel, 64 bit
- R-hub Ubuntu Linux 20.04.1 LTS, R-release
- R-hub Fedora Linux, R-devel, clang, gfortran
- R-hub Ubuntu Linux 22.04 R-release
- R-hub Ubuntu Linux, R-devel
- R-hub Windows, R-devel
- R-hub macOS, R-devel
- macOS builder, R-release

#### R CMD check results

There were no errors or warnings, only some notes under R-Hub unrelated to the
package: (see issues [#548](https://github.com/r-hub/rhub/issues/548),
[#560](https://github.com/r-hub/rhub/issues/560),
[#503](https://github.com/r-hub/rhub/issues/503)):

```
* checking HTML version of manual ... NOTE
Skipping checking HTML validation: no command 'tidy' found
Skipping checking math rendering: package 'V8' unavailable
* checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
''NULL''
* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
'lastMiKTeXException'
```
There were no errors, warnings or notes.
3 changes: 2 additions & 1 deletion man-roxygen/field-dtype.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#' @field dtype (`character(1)`)\cr
#' The data type for the calculations. Either `'float'` for
#' [torch_float] or `'double'` for [torch_double].\cr
#' \code{\link[torch]{torch_float}} or `'double'` for
#' \code{\link[torch]{torch_double}}.\cr
2 changes: 1 addition & 1 deletion man-roxygen/param-data-agnostic.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#' The individual instances to be explained by the method.
#' These must have the same format as the input data of the passed model
#' and has to be either [`matrix`], an [`array`], a [`data.frame`] or a
#' [`torch_tensor`]. If no value is specified, all instances in the
#' \code{\link[torch]{torch_tensor}}. If no value is specified, all instances in the
#' dataset `data` will be explained.\cr
#' **Note:** For the model-agnostic methods, only models with a single
#' input and output layer is allowed!\cr
2 changes: 1 addition & 1 deletion man-roxygen/param-data-optional.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @param data ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param data ([`array`], [`data.frame`], \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The data to which the method is to be applied. These must
#' have the same format as the input data of the passed model to the
#' converter object. This means either
Expand Down
2 changes: 1 addition & 1 deletion man-roxygen/param-data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @param data ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param data ([`array`], [`data.frame`], \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The data to which the method is to be applied. These must
#' have the same format as the input data of the passed model to the
#' converter object. This means either
Expand Down
4 changes: 2 additions & 2 deletions man-roxygen/param-data_ref-agnostic.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' @param data_ref ([`array`], [`data.frame`] or [`torch_tensor`])\cr
#' @param data_ref ([`array`], [`data.frame`] or \code{\link[torch]{torch_tensor}})\cr
#' The dataset to which the method is to be applied. These must
#' have the same format as the input data of the passed model and has to
#' be either [`matrix`], an [`array`], a [`data.frame`] or a
#' [`torch_tensor`].\cr
#' \code{\link[torch]{torch_tensor}}.\cr
#' **Note:** For the model-agnostic methods, only models with a single
#' input and output layer is allowed!\cr
4 changes: 2 additions & 2 deletions man-roxygen/param-dtype.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @param dtype (`character(1)`)\cr
#' The data type for the calculations. Use
#' either `'float'` for [torch_float] or `'double'` for
#' [torch_double].\cr
#' either `'float'` for \code{\link[torch]{torch_float}} or `'double'` for
#' \code{\link[torch]{torch_double}}.\cr
2 changes: 1 addition & 1 deletion man-roxygen/param-x_ref.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @param x_ref ([`array`], [`data.frame`], [`torch_tensor`] or `list`)\cr
#' @param x_ref ([`array`], [`data.frame`], \code{\link[torch]{torch_tensor}} or `list`)\cr
#' The reference input for the DeepLift method. This value
#' must have the same format as the input data of the passed model to the
#' converter object. This means either
Expand Down
6 changes: 3 additions & 3 deletions man/AgnosticWrapper.Rd

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

6 changes: 3 additions & 3 deletions man/ConnectionWeights.Rd

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

3 changes: 2 additions & 1 deletion man/Converter.Rd

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

8 changes: 4 additions & 4 deletions man/DeepLift.Rd

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

9 changes: 5 additions & 4 deletions man/DeepSHAP.Rd

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

8 changes: 4 additions & 4 deletions man/ExpectedGradient.Rd

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

6 changes: 3 additions & 3 deletions man/Gradient.Rd

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

6 changes: 3 additions & 3 deletions man/GradientBased.Rd

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

Loading
Loading