From c483a7adba1feb37eb983ab7155cb9f150be1fbe Mon Sep 17 00:00:00 2001 From: Jesse Leigh Patsolic Date: Fri, 8 May 2020 16:36:50 -0400 Subject: [PATCH] update maintainer and update version to 2.0.5 --- DESCRIPTION | 13 ++++++++----- NEWS.md | 8 ++++++++ man/BuildTree.Rd | 20 +++++++++++++++++--- man/GrowUnsupervisedForest.Rd | 17 +++++++++++++---- man/OOBPredict.Rd | 3 +-- man/Predict.Rd | 11 +++++++++-- man/RerF.Rd | 28 +++++++++++++++++++++------- man/Urerf.Rd | 16 ++++++++++++---- man/mnist.Rd | 6 ++++-- 9 files changed, 93 insertions(+), 29 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d301f8ce..6bdf66cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,15 @@ Package: rerf Type: Package Title: Randomer Forest -Version: 2.0.4 -Date: 2019-03-15 +Version: 2.0.5 +Date: 2020-05-04 Authors@R: c( - person("Jesse", "Patsolic", role = c("ctb", "cre"), email = "software@neurodata.io"), - person("Benjamin", "Falk", role = "ctb", email = "falk.ben@jhu.edu"), + person("Meghana", "Madhyastha", role = c("ctb", "cre"), email = "mmadhya1@jhu.edu"), person("Jaewon", "Chung", role = "ctb", email = "j1c@jhu.edu"), person("James", "Browne", role = "aut", email = "jbrowne6@jhu.edu"), person("Tyler", "Tomita", role = "aut", email = "ttomita2@jhmi.edu"), + person("Jesse", "Patsolic", role = "ctb", email = "jpatsol1@jhu.edu"), + person("Benjamin", "Falk", role = "ctb", email = "falk.ben@jhu.edu"), person("Joshua", "Vogelstein", role = "ths", email = "jovo@jhu.edu") ) Description: R-RerF (aka Randomer Forest (RerF) or Random Projection @@ -30,9 +31,11 @@ Depends: R (>= 3.3.0), Rcpp (>= 1.0.0) License: Apache License 2.0 | file LICENSE URL: https://github.com/neurodata/R-RerF BugReports: https://github.com/neurodata/R-RerF/issues +Contact: NeuroData Software Imports: parallel, RcppZiggurat, utils, stats, dummies, mclust Suggests: roxygen2 (>= 5.0.0), testthat LinkingTo: Rcpp, RcppArmadillo SystemRequirements: GNU make ByteCompile: true -RoxygenNote: 6.1.1 +RoxygenNote: 7.1.0 +RcppModules: forestPackingRConversion diff --git a/NEWS.md b/NEWS.md index 2d889ba9..77bbe21c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +## Changes in 2.0.5: + +* Update maintainer. + +## Changes in 2.0.4: + +* Updated tests to accomodate the new `sample()` algorithm in R 3.5.3 + ## Changes in 2.0.3: * The `PrintTree` function has been added to aid in viewing the diff --git a/man/BuildTree.Rd b/man/BuildTree.Rd index b0d38355..aff4a187 100644 --- a/man/BuildTree.Rd +++ b/man/BuildTree.Rd @@ -4,9 +4,23 @@ \alias{BuildTree} \title{RerF Tree Generator} \usage{ -BuildTree(X, Y, FUN, paramList, min.parent, max.depth, bagging, - replacement, stratify, class.ind, class.ct, store.oob, store.impurity, - progress, rotate) +BuildTree( + X, + Y, + FUN, + paramList, + min.parent, + max.depth, + bagging, + replacement, + stratify, + class.ind, + class.ct, + store.oob, + store.impurity, + progress, + rotate +) } \arguments{ \item{X}{an n by d numeric matrix (preferable) or data frame. The rows correspond to observations and columns correspond to features.} diff --git a/man/GrowUnsupervisedForest.Rd b/man/GrowUnsupervisedForest.Rd index a0283628..6ddea5e6 100644 --- a/man/GrowUnsupervisedForest.Rd +++ b/man/GrowUnsupervisedForest.Rd @@ -4,10 +4,19 @@ \alias{GrowUnsupervisedForest} \title{Creates Urerf Tree.} \usage{ -GrowUnsupervisedForest(X, MinParent = 1, trees = 100, MaxDepth = Inf, - bagging = 0.2, replacement = TRUE, FUN = makeAB, options = list(p - = ncol(X), d = ceiling(ncol(X)^0.5), sparsity = 1/ncol(X)), - Progress = TRUE, splitCrit = "twomeans", LinearCombo = TRUE) +GrowUnsupervisedForest( + X, + MinParent = 1, + trees = 100, + MaxDepth = Inf, + bagging = 0.2, + replacement = TRUE, + FUN = makeAB, + options = list(p = ncol(X), d = ceiling(ncol(X)^0.5), sparsity = 1/ncol(X)), + Progress = TRUE, + splitCrit = "twomeans", + LinearCombo = TRUE +) } \arguments{ \item{X}{an Nxd matrix or Data frame of numeric values.} diff --git a/man/OOBPredict.Rd b/man/OOBPredict.Rd index 04c980cc..e4db94b1 100644 --- a/man/OOBPredict.Rd +++ b/man/OOBPredict.Rd @@ -4,8 +4,7 @@ \alias{OOBPredict} \title{Compute out-of-bag predictions} \usage{ -OOBPredict(X, forest, num.cores = 0L, Xtrain = NULL, - output.scores = FALSE) +OOBPredict(X, forest, num.cores = 0L, Xtrain = NULL, output.scores = FALSE) } \arguments{ \item{X}{an n sample by d feature matrix (preferable) or data frame which was used to train the provided forest.} diff --git a/man/Predict.Rd b/man/Predict.Rd index 39567599..18a317db 100644 --- a/man/Predict.Rd +++ b/man/Predict.Rd @@ -4,8 +4,15 @@ \alias{Predict} \title{Compute class predictions for each observation in X} \usage{ -Predict(X, forest, OOB = FALSE, num.cores = 0L, Xtrain = NULL, - aggregate.output = TRUE, output.scores = FALSE) +Predict( + X, + forest, + OOB = FALSE, + num.cores = 0L, + Xtrain = NULL, + aggregate.output = TRUE, + output.scores = FALSE +) } \arguments{ \item{X}{an n by d numeric matrix (preferable) or data frame. The rows correspond to observations and columns correspond to features of a test set, which should be different from the training set.} diff --git a/man/RerF.Rd b/man/RerF.Rd index d69fc9a9..9639ef69 100644 --- a/man/RerF.Rd +++ b/man/RerF.Rd @@ -4,13 +4,27 @@ \alias{RerF} \title{RerF forest Generator} \usage{ -RerF(X, Y, FUN = RandMatBinary, paramList = list(p = NA, d = NA, - sparsity = NA, prob = NA), min.parent = 1L, trees = 500L, - max.depth = 0, bagging = 0.2, replacement = TRUE, - stratify = TRUE, rank.transform = FALSE, store.oob = FALSE, - store.impurity = FALSE, progress = FALSE, rotate = FALSE, - num.cores = 0L, seed = sample(0:1e+08, 1), cat.map = NULL, - rfPack = FALSE) +RerF( + X, + Y, + FUN = RandMatBinary, + paramList = list(p = NA, d = NA, sparsity = NA, prob = NA), + min.parent = 1L, + trees = 500L, + max.depth = 0, + bagging = 0.2, + replacement = TRUE, + stratify = TRUE, + rank.transform = FALSE, + store.oob = FALSE, + store.impurity = FALSE, + progress = FALSE, + rotate = FALSE, + num.cores = 0L, + seed = sample(0:1e+08, 1), + cat.map = NULL, + rfPack = FALSE +) } \arguments{ \item{X}{an n by d numeric matrix (preferable) or data frame. The rows correspond to observations and columns correspond to features.} diff --git a/man/Urerf.Rd b/man/Urerf.Rd index 2c44d94c..6011cd61 100644 --- a/man/Urerf.Rd +++ b/man/Urerf.Rd @@ -4,10 +4,18 @@ \alias{Urerf} \title{Unsupervised RerF forest Generator} \usage{ -Urerf(X, trees = 100, min.parent = round(nrow(X)^0.5), - max.depth = NA, mtry = ceiling(ncol(X)^0.5), sparsity = 1/ncol(X), - normalizeData = TRUE, Progress = TRUE, splitCrit = "twomeans", - LinearCombo = TRUE) +Urerf( + X, + trees = 100, + min.parent = round(nrow(X)^0.5), + max.depth = NA, + mtry = ceiling(ncol(X)^0.5), + sparsity = 1/ncol(X), + normalizeData = TRUE, + Progress = TRUE, + splitCrit = "twomeans", + LinearCombo = TRUE +) } \arguments{ \item{X}{an n by d numeric matrix. The rows correspond to observations and columns correspond to features.} diff --git a/man/mnist.Rd b/man/mnist.Rd index a438b203..452f83ef 100644 --- a/man/mnist.Rd +++ b/man/mnist.Rd @@ -4,10 +4,12 @@ \name{mnist} \alias{mnist} \title{A subset of the MNIST dataset for handwritten digit classification} -\format{A list with four items: Xtrain is a training set matrix with 6000 rows (samples) and 784 columns (features), +\format{ +A list with four items: Xtrain is a training set matrix with 6000 rows (samples) and 784 columns (features), Xtrain is an integer array of corresponding training class labels, Xtest is a test set matrix of 10000 rows and 784 columns, and Ytest is the corresponding class labels. Rows in Xtrain and Xtest correspond to different images of digits, -and columns correspond to the pixel intensities in each image, obtained by flattening the image pixels in column-major ordering.} +and columns correspond to the pixel intensities in each image, obtained by flattening the image pixels in column-major ordering. +} \source{ \href{http://yann.lecun.com/exdb/mnist/}{MNIST} }