Skip to content

Commit

Permalink
small doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Nov 3, 2023
1 parent 7a2895d commit 2c8c19a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 30 deletions.
10 changes: 4 additions & 6 deletions R/sample_pseudoabs_time.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
#' of semantics) points from a raster given a set of presences.
#' The locations returned as the center points of the sampled cells, which can
#' not overlap with the presences. The following methods are implemented:
#' {/itemize:
#' /item: 'random': pseudo-absences/background randomly sampled from the region covered by the
#' * 'random': pseudo-absences/background randomly sampled from the region covered by the
#' raster (i.e. not NAs).
#' /item: 'dist_min': pseudo-absences/background randomly sampled from the region excluding a buffer
#' * 'dist_min': pseudo-absences/background randomly sampled from the region excluding a buffer
#' of 'dist_min' from presences (distances in 'm' for lonlat rasters, and in map
#' units for projected rasters).
#' /item: 'dist_max': pseudo-absences/background randomly sampled from the unioned buffers
#' * 'dist_max': pseudo-absences/background randomly sampled from the unioned buffers
#' of 'dist_max' from presences (distances in 'm' for lonlat rasters, and in map
#' units for projected rasters). Using the union of buffers means that areas that
#' are in multiple buffers are not oversampled. This is also referred to as "thickening".
#' /item: 'dist_disc': pseudo-absences/background randomly sampled from the unioned discs around presences
#' * 'dist_disc': pseudo-absences/background randomly sampled from the unioned discs around presences
#' with the two values of 'dist_disc' defining the minimum and maximum distance from
#' presences.
#' }
#' @param data An [`sf::sf`] data frame, or a data frame with coordinate variables.
#' These can be defined in `coords`, unless they have standard names
#' (see details below).
Expand Down
10 changes: 4 additions & 6 deletions R/sdm_spec_boost_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
#' @param ... parameters to be passed to [parsnip::boost_tree()] to
#' customise the model. See the help of that function for details.
#' @param tune character defining the tuning strategy. Valid strategies are:
#' {itemize:
#' /item: "sdm" chooses hyperparameters that are most important to tune for
#' * "sdm" chooses hyperparameters that are most important to tune for
#' an sdm (for *boost_tree*: 'mtry', 'trees', 'tree_depth', 'learn_rate',
#' 'loss_reduction', and 'stop_iter')
#' /item: "all" tunes all hyperparameters (for *boost_tree*: 'mtry', 'trees',
#' * "all" tunes all hyperparameters (for *boost_tree*: 'mtry', 'trees',
#' 'tree_depth', 'learn_rate',
#' 'loss_reduction', 'stop_iter','min_n' and 'sample_size')
#' /item: "custom" passes the options from '...'
#' /item: "none" does not tune any hyperparameter
#' }
#' * "custom" passes the options from '...'
#' * "none" does not tune any hyperparameter
#' @returns a [parsnip::model_spec] of the model.
#' @examples
#' standard_bt_spec <- sdm_spec_boost_tree()
Expand Down
10 changes: 4 additions & 6 deletions R/sdm_spec_maxent.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
#' @param ... parameters to be passed to [maxent()] to
#' customise the model. See the help of that function for details.
#' @param tune character defining the tuning strategy. Valid strategies are:
#' {itemize:
#' /item: "sdm" chooses hyperparameters that are most important to tune for
#' * "sdm" chooses hyperparameters that are most important to tune for
#' an sdm (for *maxent*, 'mtry')
#' /item: "all" tunes all hyperparameters (for *maxent*, 'mtry', 'trees' and 'min')
#' /item: "custom" passes the options from '...'
#' /item: "none" does not tune any hyperparameter
#' }
#' * "all" tunes all hyperparameters (for *maxent*, 'mtry', 'trees' and 'min')
#' * "custom" passes the options from '...'
#' * "none" does not tune any hyperparameter
#' @returns a [parsnip::model_spec] of the model.
#' @examples
#' test_maxent_spec <- sdm_spec_maxent(tune = "sdm")
Expand Down
10 changes: 4 additions & 6 deletions R/sdm_spec_rand_forest.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
#' @param ... parameters to be passed to [parsnip::rand_forest()] to
#' customise the model. See the help of that function for details.
#' @param tune character defining the tuning strategy. Valid strategies are:
#' {itemize:
#' /item: "sdm" chooses hyperparameters that are most important to tune for
#' * "sdm" chooses hyperparameters that are most important to tune for
#' an sdm (for *rf*, 'mtry')
#' /item: "all" tunes all hyperparameters (for *rf*, 'mtry', 'trees' and 'min')
#' /item: "custom" passes the options from '...'
#' /item: "none" does not tune any hyperparameter
#' }
#' * "all" tunes all hyperparameters (for *rf*, 'mtry', 'trees' and 'min')
#' * "custom" passes the options from '...'
#' * "none" does not tune any hyperparameter
#' @returns a [parsnip::model_spec] of the model.
#' @examples
#' test_rf_spec <- sdm_spec_rf(tune = "sdm")
Expand Down
8 changes: 3 additions & 5 deletions R/simple_ensemble.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
#' @param ... not used, this function just creates an empty `simple_ensemble`
#' object. Members are added with `add_best_candidates()`
#' @returns an empty `simple_ensemble`. This is a tibble with columns:
#' {/itemize:
#' /item: `wflow_id`: the name of the workflows for which the best model was
#' * `wflow_id`: the name of the workflows for which the best model was
#' chosen
#' /item: `workflow`: the trained workflow objects
#' /item: `metrics`: metrics based on the crossvalidation resampling used
#' * `workflow`: the trained workflow objects
#' * `metrics`: metrics based on the crossvalidation resampling used
#' to tune the models
#' }
#' @export

simple_ensemble <- function(...) {
Expand Down
3 changes: 2 additions & 1 deletion cran_comments.md → cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ This is a new package not present on CRAN yet.

On all testing environment (see below), we only get a note because of the
package being a new submission, and a false positive for mispelling
(paleoclimate is an existing word and is spelled correctly).
(author name in the reference, and tidymodels).

## Test environments
- R-hub windows-x86_64-devel (r-devel)
- R-hub ubuntu-gcc-release (r-release)
- R-hub fedora-clang-devel (r-devel)
- devtools::check_mac_release
- devtools::check_win_devel()

## R CMD check results
On all systems:
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Schmiegelow
SpatRaster
StackOverflow
TSS
Tidymodels
Trang
WGS
WorldClim
Expand Down

0 comments on commit 2c8c19a

Please sign in to comment.