imbs-hl/ranger
Fork: 192 Star: 775 (更新于 2024-11-05 17:39:09)
license: 暂无
Language: C++ .
A Fast Implementation of Random Forests
最后发布版本: v0.13.1 ( 2022-01-11 21:23:23)
ranger: A Fast Implementation of Random Forests
Marvin N. Wright
Introduction
ranger is a fast implementation of random forests (Breiman 2001) or recursive partitioning, particularly suited for high dimensional data. Classification, regression, and survival forests are supported. Classification and regression forests are implemented as in the original Random Forest (Breiman 2001), survival forests as in Random Survival Forests (Ishwaran et al. 2008). Includes implementations of extremely randomized trees (Geurts et al. 2006) and quantile regression forests (Meinshausen 2006).
ranger is written in C++, but a version for R is available, too. We recommend to use the R version. It is easy to install and use and the results are readily available for further analysis. The R version is as fast as the standalone C++ version.
Installation
R version
To install the ranger R package from CRAN, just run
install.packages("ranger")
R version >= 3.1 is required. With recent R versions, multithreading on Windows platforms should just work. If you compile yourself, the new RTools toolchain is required.
To install the development version from GitHub using devtools
, run
devtools::install_github("imbs-hl/ranger")
Standalone C++ version
To install the C++ version of ranger in Linux or Mac OS X you will need a compiler supporting C++14 (i.e. gcc >= 5 or Clang >= 3.4) and Cmake. To build start a terminal from the ranger main directory and run the following commands
cd cpp_version
mkdir build
cd build
cmake ..
make
After compilation there should be an executable called "ranger" in the build directory.
To run the C++ version in Microsoft Windows please cross compile or ask for a binary.
Usage
R version
For usage of the R version see ?ranger in R. Most importantly, see the Examples section. As a first example you could try
ranger(Species ~ ., data = iris)
Standalone C++ version
In the C++ version type
./ranger --help
for a list of commands. First you need a training dataset in a file. This file should contain one header line with variable names and one line with variable values per sample (numeric only). Variable names must not contain any whitespace, comma or semicolon. Values can be separated by whitespace, comma or semicolon but can not be mixed in one file. A typical call of ranger would be for example
./ranger --verbose --file data.dat --depvarname Species --treetype 1 --ntree 1000 --nthreads 4
If you find any bugs, or if you experience any crashes, please report to us. If you have any questions just ask, we won't bite.
Please cite our paper if you use ranger.
References
- Wright, M. N. & Ziegler, A. (2017). ranger: A fast implementation of random forests for high dimensional data in C++ and R. J Stat Softw 77:1-17. https://doi.org/10.18637/jss.v077.i01.
- Schmid, M., Wright, M. N. & Ziegler, A. (2016). On the use of Harrell's C for clinical risk prediction via random survival forests. Expert Syst Appl 63:450-459. https://doi.org/10.1016/j.eswa.2016.07.018.
- Wright, M. N., Dankowski, T. & Ziegler, A. (2017). Unbiased split variable selection for random survival forests using maximally selected rank statistics. Stat Med 36:1272-1284. https://doi.org/10.1002/sim.7212.
- Nembrini, S., König, I. R. & Wright, M. N. (2018). The revival of the Gini Importance? Bioinformatics. https://doi.org/10.1093/bioinformatics/bty373.
- Breiman, L. (2001). Random forests. Mach Learn, 45:5-32. https://doi.org/10.1023/A:1010933404324.
- Ishwaran, H., Kogalur, U. B., Blackstone, E. H., & Lauer, M. S. (2008). Random survival forests. Ann Appl Stat 2:841-860. https://doi.org/10.1097/JTO.0b013e318233d835.
- Malley, J. D., Kruppa, J., Dasgupta, A., Malley, K. G., & Ziegler, A. (2012). Probability machines: consistent probability estimation using nonparametric learning machines. Methods Inf Med 51:74-81. https://doi.org/10.3414/ME00-01-0052.
- Hastie, T., Tibshirani, R., Friedman, J. (2009). The Elements of Statistical Learning. Springer, New York. 2nd edition.
- Geurts, P., Ernst, D., Wehenkel, L. (2006). Extremely randomized trees. Mach Learn 63:3-42. https://doi.org/10.1007/s10994-006-6226-1.
- Meinshausen (2006). Quantile Regression Forests. J Mach Learn Res 7:983-999. http://www.jmlr.org/papers/v7/meinshausen06a.html.
- Sandri, M. & Zuccolotto, P. (2008). A bias correction algorithm for the Gini variable importance measure in classification trees. J Comput Graph Stat, 17:611-628. https://doi.org/10.1198/106186008X344522.
- Coppersmith D., Hong S. J., Hosking J. R. (1999). Partitioning nominal attributes in decision trees. Data Min Knowl Discov 3:197-217. https://doi.org/10.1023/A:1009869804967.
最近版本更新:(数据更新于 2024-09-20 10:07:07)
2022-01-11 21:23:23 v0.13.1
2020-05-18 22:20:05 0.12.3_mit_only
2018-05-24 19:27:07 0.9.11
2017-12-14 00:16:15 0.8.3
2016-05-02 17:06:57 0.4.2
2016-04-07 21:00:52 v0.4.0
2015-11-10 20:33:38 v0.3.0
imbs-hl/ranger同语言 C++最近更新仓库
2024-11-21 04:48:41 PCSX2/pcsx2
2024-11-20 09:02:24 dail8859/NotepadNext
2024-11-20 04:28:15 microsoft/terminal
2024-11-18 22:35:05 ClickHouse/ClickHouse
2024-11-18 14:36:13 cxasm/notepad--
2024-11-18 00:19:27 MaaAssistantArknights/MaaAssistantArknights