Skip to content

Commit

Permalink
fix docs/exports
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Nov 6, 2024
1 parent 0a296dc commit ed3ab7e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ S3method(print,deforest.ranger)
S3method(print,ranger)
S3method(print,ranger.forest)
S3method(print,ranger.prediction)
S3method(str,ranger)
S3method(str,ranger.forest)
S3method(timepoints,ranger)
S3method(timepoints,ranger.prediction)
export(csrf)
Expand Down
3 changes: 3 additions & 0 deletions R/hshrink.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#' @return The ranger object is modified in-place.
#'
#' @examples
#' ## Hierarchical shrinkage for a probablity forest
#' rf <- ranger(Species ~ ., iris, node.stats = TRUE, probability = TRUE)
#' hshrink(rf, lambda = 5)
##' @references
##' \itemize{
##' \item Agarwal, A., Tan, Y.S., Ronen, O., Singh, C. & Yu, B. (2022). Hierarchical Shrinkage: Improving the accuracy and interpretability of tree-based models. Proceedings of the 39th International Conference on Machine Learning, PMLR 162:111-135.
Expand Down
2 changes: 2 additions & 0 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ print.ranger.prediction <- function(x, ...) {
}
}

##' @export
str.ranger.forest <- function(object, max.level = 2, ...) {
class(object) <- "list"
str(object, max.level = max.level, ...)
}

##' @export
str.ranger <- function(object, max.level = 2, ...) {
class(object) <- "list"
str(object, max.level = max.level, ...)
Expand Down
5 changes: 5 additions & 0 deletions man/hshrink.Rd

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

0 comments on commit ed3ab7e

Please sign in to comment.