Skip to content

Commit 09450c4

Browse files
committed
in prep for cran submission, fix typos, reduce example run time, fix broken link and replace rawgit links with https://cdn.staticaly.com/gh/ because rawgit will be down very soon.
1 parent 56e2398 commit 09450c4

12 files changed

+33
-21
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ materials*
55
^_pkgdown\.yml$
66
^\.travis\.yml$
77
^cran-comments\.md$
8+
^doc$
9+
^Meta$

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.Rproj.user
22
.Rhistory
33
.RData
4+
doc
5+
Meta

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: randomForestExplainer
22
Title: Explaining and Visualizing Random Forests in Terms of Variable Importance
3-
Version: 0.9
3+
Version: 0.10.0
44
Authors@R: c(
55
person("Aleksandra", "Paluszynska", email = "[email protected]", role = c("aut")),
66
person("Przemyslaw", "Biecek", email = "[email protected]", role = c("aut","ths")),
@@ -18,13 +18,13 @@ Imports:
1818
GGally (>= 1.3.0),
1919
ggplot2 (>= 2.2.1),
2020
ggrepel (>= 0.6.5),
21-
MASS (>= 7.3.47),
2221
randomForest (>= 4.6.12),
2322
ranger(>= 0.9.0),
2423
reshape2 (>= 1.4.2),
2524
rmarkdown (>= 1.5)
2625
Suggests:
2726
knitr,
27+
MASS (>= 7.3.47),
2828
testthat
2929
VignetteBuilder: knitr
3030
RoxygenNote: 6.1.1

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# randomForestExplainer 0.10.0
2+
## New features
3+
* Added support for ranger forests.
4+
* Added support for unsupervised randomForest.
5+
* Added tests for most functions.
6+
7+
## Bug fixes
8+
* More intuitive error message for explain_forest when local importance is absent.

R/measure_importance.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ measure_importance.ranger <- function(forest, mean_sample = "top_trees", measure
246246
#' @param importance_frame A result of using the function measure_importance() to a random forest or a randomForest object
247247
#' @param measures A character vector specifying the measures of importance to be used
248248
#' @param k The number of variables to extract
249-
#' @param ties_action One of three: c("none", "all", "draw"); specifies which variables to pick when ties occur. When set to "none" we may get less than k variables, when "all" whe may get more and "draw" makes us get exactly k.
249+
#' @param ties_action One of three: c("none", "all", "draw"); specifies which variables to pick when ties occur. When set to "none" we may get less than k variables, when "all" we may get more and "draw" makes us get exactly k.
250250
#'
251251
#' @return A character vector with names of k variables with highest sum of rankings
252252
#'

R/min_depth_distribution.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ calculate_tree_depth_ranger <- function(frame){
3939
#' @return A data frame with the value of minimal depth for every variable in every tree
4040
#'
4141
#' @examples
42-
#' min_depth_distribution(randomForest::randomForest(Species ~ ., data = iris))
43-
#' min_depth_distribution(ranger::ranger(Species ~ ., data = iris))
42+
#' min_depth_distribution(randomForest::randomForest(Species ~ ., data = iris, ntree = 100))
43+
#' min_depth_distribution(ranger::ranger(Species ~ ., data = iris, num.trees = 100))
4444
#'
4545
#' @export
4646
min_depth_distribution <- function(forest){

R/min_depth_interactions.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ min_depth_interactions_values_ranger <- function(forest, vars){
110110
#' Calculate mean conditional minimal depth with respect to a vector of variables
111111
#'
112112
#' @param forest A randomForest object
113-
#' @param vars A character vector with variables with respect to which conditional minimal depth will be calculated; by defalt it is extracted by the important_variables function but this may be time consuming
113+
#' @param vars A character vector with variables with respect to which conditional minimal depth will be calculated; by default it is extracted by the important_variables function but this may be time consuming
114114
#' @param mean_sample The sample of trees on which conditional mean minimal depth is calculated, possible values are "all_trees", "top_trees", "relevant_trees"
115115
#' @param uncond_mean_sample The sample of trees on which unconditional mean minimal depth is calculated, possible values are "all_trees", "top_trees", "relevant_trees"
116116
#'
117-
#' @return A data frame with each observarion giving the means of conditional minimal depth and the size of sample for a given interaction
117+
#' @return A data frame with each observation giving the means of conditional minimal depth and the size of sample for a given interaction
118118
#'
119119
#' @examples
120120
#' forest <- randomForest::randomForest(Species ~ ., data = iris, ntree = 100)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[![codecov](https://codecov.io/gh/ModelOriented/randomForestExplainer/branch/master/graph/badge.svg)](https://codecov.io/gh/ModelOriented/randomForestExplainer)
66
[![DOI](https://zenodo.org/badge/97007621.svg)](https://zenodo.org/badge/latestdoi/97007621)
77

8-
A set of tools to understand what is happening inside a Random Forest. A detailed discussion of the package and importance measures it implements can be found here: [Master thesis on randomForestExplainer](https://rawgit.com/geneticsMiNIng/BlackBoxOpener/master/randomForestExplainer_Master_thesis.pdf).
8+
A set of tools to understand what is happening inside a Random Forest. A detailed discussion of the package and importance measures it implements can be found here: [Master thesis on randomForestExplainer](https://cdn.staticaly.com/gh/geneticsMiNIng/BlackBoxOpener/master/randomForestExplainer_Master_thesis.pdf).
99

10-
## Instalation
10+
## Installation
1111

1212
randomForestExplainer can be installed from [CRAN](https://cran.r-project.org/package=randomForestExplainer) as follows:
1313

@@ -26,12 +26,12 @@ library(randomForestExplainer)
2626

2727
## Vignette
2828

29-
* [Understanding random forests with randomForestExplainer](https://rawgit.com/ModelOriented/randomForestExplainer/master/inst/doc/randomForestExplainer.html)
29+
* [Understanding random forests with randomForestExplainer](https://cdn.staticaly.com/gh/ModelOriented/randomForestExplainer/master/inst/doc/randomForestExplainer.html)
3030

3131
## Cheatsheets
3232

3333
* [A one-page summary](https://github.com/ModelOriented/randomForestExplainer/blob/master/materials/cheatsheet.pdf)
3434

3535
## Examples
3636

37-
* [Initial vignette for glioblastoma data](https://rawgit.com/geneticsMiNIng/BlackBoxOpener/master/randomForestExplainer/inst/doc/randomForestExplainer.html)
37+
* [Initial vignette for glioblastoma data](https://cdn.staticaly.com/gh/geneticsMiNIng/BlackBoxOpener/master/randomForestExplainer/inst/doc/randomForestExplainer.html)

man/important_variables.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/min_depth_distribution.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)