Skip to content

Commit

Permalink
Merge pull request #532 from vspinu/timeslice
Browse files Browse the repository at this point in the history
Fix missing skip parameter and fix timeslice documentation
  • Loading branch information
topepo committed Nov 25, 2016
2 parents 9d05859 + 86828a9 commit 2a964a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ pkg/caret/DESCRIPTION~

.Rproj.user

*~

*\#*\#

*.\#*

TAGS

pkg/caret/inst/NEWS.Rd~

pkg/caret/src/symbols.rds
Expand Down
3 changes: 2 additions & 1 deletion pkg/caret/R/train.default.R
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ train.default <- function(x, y,
timeslice = createTimeSlices(seq(along = y),
initialWindow = trControl$initialWindow,
horizon = trControl$horizon,
fixedWindow = trControl$fixedWindow)$train,
fixedWindow = trControl$fixedWindow,
skip = trControl$skip)$train,
subsemble = subsemble_index(y, V = trControl$number, J = trControl$repeats))
} else {
index_types <- unlist(lapply(trControl$index, is.integer))
Expand Down
4 changes: 2 additions & 2 deletions pkg/caret/R/trainControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#' repeated training/test splits), \code{"none"} (only fits one model to the
#' entire training set), \code{"oob"} (only for random forest, bagged trees,
#' bagged earth, bagged flexible discriminant analysis, or conditional tree
#' forest models), \code{"adaptive_cv"}, \code{"adaptive_boot"} or
#' forest models), \code{timeslice}, \code{"adaptive_cv"}, \code{"adaptive_boot"} or
#' \code{"adaptive_LGOCV"}
#' @param number Either the number of folds or number of resampling iterations
#' @param repeats For repeated k-fold cross-validation only: the number of
Expand All @@ -62,7 +62,7 @@
#' @param search Either \code{"grid"} or \code{"random"}, describing how the
#' tuning parameter grid is determined. See details below.
#' @param initialWindow,horizon,fixedWindow,skip possible arguments to
#' \code{\link{createTimeSlices}}
#' \code{\link{createTimeSlices}} when method is \code{timeslice}.
#' @param classProbs a logical; should class probabilities be computed for
#' classification models (along with predicted values) in each resample?
#' @param summaryFunction a function to compute performance metrics across
Expand Down
4 changes: 2 additions & 2 deletions pkg/caret/man/trainControl.Rd

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

0 comments on commit 2a964a3

Please sign in to comment.