diff -Nru r-cran-randomforest-4.6-10/debian/changelog r-cran-randomforest-4.6-12/debian/changelog --- r-cran-randomforest-4.6-10/debian/changelog 2014-08-12 15:19:29.000000000 +0000 +++ r-cran-randomforest-4.6-12/debian/changelog 2015-11-10 18:42:50.000000000 +0000 @@ -1,3 +1,10 @@ +r-cran-randomforest (4.6-12-1) unstable; urgency=medium + + * New upstream version + * Removed unneeded xvfb, xauth to Build-Depends again + + -- Andreas Tille Tue, 10 Nov 2015 19:42:48 +0100 + r-cran-randomforest (4.6-10-1) unstable; urgency=low [ Charles Plessy ] @@ -5,8 +12,10 @@ [ Andreas Tille ] * New upstream version + * Add xvfb, xauth to Build-Depends + * cme fix dpkg-control - -- Andreas Tille Tue, 12 Aug 2014 17:17:05 +0200 + -- Andreas Tille Thu, 23 Oct 2014 14:03:18 +0200 r-cran-randomforest (4.6-7-1) unstable; urgency=low diff -Nru r-cran-randomforest-4.6-10/debian/control r-cran-randomforest-4.6-12/debian/control --- r-cran-randomforest-4.6-10/debian/control 2014-08-12 15:18:03.000000000 +0000 +++ r-cran-randomforest-4.6-12/debian/control 2014-10-23 12:23:33.000000000 +0000 @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9), cdbs, r-base-dev -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-cran-randomforest/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-cran-randomforest/trunk/ Homepage: http://cran.r-project.org/web/packages/randomForest/ diff -Nru r-cran-randomforest-4.6-10/debian/rules r-cran-randomforest-4.6-12/debian/rules --- r-cran-randomforest-4.6-10/debian/rules 2013-09-12 08:59:18.000000000 +0000 +++ r-cran-randomforest-4.6-12/debian/rules 2014-10-23 11:59:46.000000000 +0000 @@ -1,3 +1,5 @@ #!/usr/bin/make -f include /usr/share/R/debian/r-cran.mk + +# xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \ No newline at end of file diff -Nru r-cran-randomforest-4.6-10/DESCRIPTION r-cran-randomforest-4.6-12/DESCRIPTION --- r-cran-randomforest-4.6-10/DESCRIPTION 2014-07-17 13:53:29.000000000 +0000 +++ r-cran-randomforest-4.6-12/DESCRIPTION 2015-10-07 06:38:34.000000000 +0000 @@ -1,8 +1,8 @@ Package: randomForest -Title: Breiman and Cutler's random forests for classification and - regression -Version: 4.6-10 -Date: 2014-07-17 +Title: Breiman and Cutler's Random Forests for Classification and + Regression +Version: 4.6-12 +Date: 2015-10-06 Depends: R (>= 2.5.0), stats Suggests: RColorBrewer, MASS Author: Fortran original by Leo Breiman and Adele Cutler, R port by @@ -11,8 +11,8 @@ using random inputs. Maintainer: Andy Liaw License: GPL (>= 2) -URL: http://stat-www.berkeley.edu/users/breiman/RandomForests -Packaged: 2014-07-17 12:18:43 UTC; liawand +URL: https://www.stat.berkeley.edu/~breiman/RandomForests/ NeedsCompilation: yes +Packaged: 2015-10-06 18:28:23 UTC; Liawand Repository: CRAN -Date/Publication: 2014-07-17 15:53:29 +Date/Publication: 2015-10-07 08:38:34 diff -Nru r-cran-randomforest-4.6-10/inst/NEWS r-cran-randomforest-4.6-12/inst/NEWS --- r-cran-randomforest-4.6-10/inst/NEWS 2014-07-17 12:18:41.000000000 +0000 +++ r-cran-randomforest-4.6-12/inst/NEWS 2015-10-06 18:28:23.000000000 +0000 @@ -7,6 +7,19 @@ * Allow case weights by using the weights in sampling? ======================================================================== +Changes in 4.6-12: + +* The "inbag" component of the randomForest object now records the number of + times an observation is included in the bootstrap sample, instead of just + indicating whether it is included or not. + + * The "ncat" component of the "forest" component of the randomForest object + now always has names that are the column names of x. + + * The "inbag" component is combined properly now in the combine() function. + + * Housekeeping: Cleaned up the DESCRIPTION, NAMESPACE, and URLs in help files. + Changes in 4.6-10: * Fixed bugs introduced in 4.6-8 and 4.6-9. Levels for ordered factors diff -Nru r-cran-randomforest-4.6-10/man/randomForest.Rd r-cran-randomforest-4.6-12/man/randomForest.Rd --- r-cran-randomforest-4.6-10/man/randomForest.Rd 2014-07-17 12:18:41.000000000 +0000 +++ r-cran-randomforest-4.6-12/man/randomForest.Rd 2015-10-06 18:28:23.000000000 +0000 @@ -194,7 +194,7 @@ 5-32. Breiman, L (2002), ``Manual On Setting Up, Using, And Understanding - Random Forests V3.1'', \url{http://oz.berkeley.edu/users/breiman/Using_random_forests_V3.1.pdf}. + Random Forests V3.1'', \url{https://www.stat.berkeley.edu/~breiman/Using_random_forests_V3.1.pdf}. } \author{Andy Liaw \email{andy\_liaw@merck.com} and Matthew Wiener \email{matthew\_wiener@merck.com}, based on original Fortran code by diff -Nru r-cran-randomforest-4.6-10/man/rfImpute.Rd r-cran-randomforest-4.6-12/man/rfImpute.Rd --- r-cran-randomforest-4.6-10/man/rfImpute.Rd 2014-07-17 12:18:41.000000000 +0000 +++ r-cran-randomforest-4.6-12/man/rfImpute.Rd 2015-10-06 18:28:23.000000000 +0000 @@ -46,7 +46,7 @@ \references{ Leo Breiman (2003). Manual for Setting Up, Using, and Understanding Random Forest V4.0. - \url{http://oz.berkeley.edu/users/breiman/Using_random_forests_v4.0.pdf} + \url{https://www.stat.berkeley.edu/~breiman/Using_random_forests_v4.0.pdf} } \seealso{ \code{\link{na.roughfix}}. diff -Nru r-cran-randomforest-4.6-10/MD5 r-cran-randomforest-4.6-12/MD5 --- r-cran-randomforest-4.6-10/MD5 2014-07-17 13:53:29.000000000 +0000 +++ r-cran-randomforest-4.6-12/MD5 2015-10-07 06:38:34.000000000 +0000 @@ -1,13 +1,13 @@ 393a5ca445f6965873eca0259a17f833 *COPYING -ea12a3653c33d03204ac63b46f64bdbd *DESCRIPTION -1af1bc3aead1dde855db3123db9ac38c *NAMESPACE -e86c65041f1e9577e1dcf1dff085b969 *R/MDSplot.R +9db68d211aa9c437ccd7a05b53fe7d06 *DESCRIPTION +a4f04128c819a5f49d0843e171eb2db8 *NAMESPACE +a025b98c25cb7761c0dbf3f421618a4d *R/MDSplot.R eae0c348160c0e1f5c5140169c7610be *R/classCenter.R -18674a0600679868a42a4ce672f0b43e *R/combine.R +15a26685a69a36cb0dc0e6005384f6d9 *R/combine.R 6589f2426e6f9a2a961cc1fe1afbb0fa *R/getTree.R 2cbf5555f37b34e8b13b48075dce0837 *R/grow.R d8c96e25b254dc8ca3d82914496e03f9 *R/importance.R -8aa62dd033ba9178cb95b91a247da748 *R/margin.R +ef65d0e1cf1d3c25649c3bb17ca92a02 *R/margin.R 9534d1b1bd2f070a12c0663be4575ca2 *R/na.roughfix.R 79adf4b734d2f4a72ccebaf26257123b *R/outlier.R aeb6b6722cd382522b7cda751c98dd09 *R/partialPlot.R @@ -15,7 +15,7 @@ 73712e72ab026d964099efd973c4668a *R/predict.randomForest.R a34e189949da4530eb9ac7efc04abe7a *R/print.randomForest.R 9a47b11b9fe7f00849a8d5c076f701be *R/randomForest.R -539a8a663906b8d9ff406c6428867b6f *R/randomForest.default.R +634b1816d721a94c5b5ccd7ee6200385 *R/randomForest.default.R ea5e3645eee3828a6c81aa09a95211e6 *R/randomForest.formula.R 4d163330cc40560f8241d7b781c15cca *R/rfImpute.R efe14c96f36ac3890b1d8cf194dc5ec6 *R/rfNews.R @@ -27,7 +27,7 @@ a54ba14b0cb6cc15e4b7687ead9a2bf9 *R/zzz.R 6d430e97b1da9c1b19eabda685c248b3 *data/imports85.rda 9162881b7d318756c63a28e52b41c2d7 *inst/CITATION -8d0b94865ec4e12f18626790067b979f *inst/NEWS +ee525249ee43164f8ee1f9e10de540ef *inst/NEWS b9b69f61e9ed079e1d9d84df6360d522 *man/MDSplot.Rd 4fcbc72dd2475ff32f5a348bfa71af41 *man/classCenter.Rd bf3608aff76e654e77632a516980f451 *man/combine.Rd @@ -41,8 +41,8 @@ 5f3f517b199cd1fb6e2db84e21bf0719 *man/partialPlot.Rd e0493ce4c5109e96c42cf9dec0e2a018 *man/plot.randomForest.Rd 23088ecd37387e89b75598b51b1dc74d *man/predict.randomForest.Rd -bcc02b8a175378dea5222276054dab01 *man/randomForest.Rd -403c7c0cdec2658cba6c7c4e5607b593 *man/rfImpute.Rd +49f4d5a6196de56295514a7386ee5573 *man/randomForest.Rd +577cf65bf896e4b7cfda15211499d787 *man/rfImpute.Rd c81b1c719dcdc878c80adb4353f831ae *man/rfNews.Rd 4106ea1e9b2b9986f30cc91a6695a464 *man/rfcv.Rd f5431e1a30968d9fd31f7b964f9384d1 *man/treesize.Rd @@ -51,8 +51,8 @@ 1638c2a6ba3ef89fe83321470c6d9386 *man/varUsed.Rd 4990d359cb318eb43492af652de44ee1 *src/classTree.c f38d50f44eac749f91c20e0f4915d270 *src/regTree.c -c84768f6ea3d213b40c40631d70060eb *src/regrf.c -1b5d0f874ec315803179e22c5a912db6 *src/rf.c +a9bf5c60da49bda9d3d725618c3cd851 *src/regrf.c +533ef8ac5d7f0189b85582621d29dc3a *src/rf.c 6c59001282eeabfaf0893f585d90b3d8 *src/rf.h e8c1243d0b05d3e3f334f16da657fc25 *src/rfsub.f -f217e5b9dc4d29f6ec3817db8d114d46 *src/rfutils.c +4f6c01122409ca981deaf7ed58011078 *src/rfutils.c diff -Nru r-cran-randomforest-4.6-10/NAMESPACE r-cran-randomforest-4.6-12/NAMESPACE --- r-cran-randomforest-4.6-10/NAMESPACE 2014-07-17 12:18:42.000000000 +0000 +++ r-cran-randomforest-4.6-12/NAMESPACE 2015-10-06 18:28:23.000000000 +0000 @@ -22,3 +22,12 @@ S3method(na.roughfix, data.frame) S3method(na.roughfix, default) + +importFrom("grDevices", "rainbow") +importFrom("graphics", "axis", "barplot", "dotchart", "lines", + "matplot", "mtext", "pairs", "par", "plot", "plot.default", + "points") +importFrom("stats", "delete.response", "mad", "median", "model.frame", + "model.response", "na.fail", "na.omit", "napredict", + "predict", "quantile", "reformulate", "terms", "update", + "var", "weighted.mean") diff -Nru r-cran-randomforest-4.6-10/R/combine.R r-cran-randomforest-4.6-12/R/combine.R --- r-cran-randomforest-4.6-10/R/combine.R 2014-07-17 12:18:42.000000000 +0000 +++ r-cran-randomforest-4.6-12/R/combine.R 2015-10-06 18:28:23.000000000 +0000 @@ -145,24 +145,27 @@ ## If proximity is in all of them, compute the average ## (weighted by the number of trees in each forest) have.prox <- !any(sapply(rflist, function(x) is.null(x$proximity))) - if(have.prox) { + if (have.prox) { rf$proximity <- 0 for(i in 1:nforest) rf$proximity <- rf$proximity + rflist[[i]]$proximity * rflist[[i]]$ntree rf$proximity <- rf$proximity / ntree } - - ## Set confusion matrix and error rates to NULL - if(classRF) { - rf$confusion <- NULL - rf$err.rate <- NULL - if(haveTest) { - rf$test$confusion <- NULL - rf$err.rate <- NULL - } - } else { - rf$mse <- rf$rsq <- NULL - if(haveTest) rf$test$mse <- rf$test$rsq <- NULL - } - rf + + ## if there are inbag matrices, combine them as well. + hasInBag <- all(sapply(rflist, function(x) !is.null(x$inbag))) + if (hasInBag) rf$inbag <- do.call(cbind, lapply(rflist, "[[", "inbag")) + ## Set confusion matrix and error rates to NULL + if (classRF) { + rf$confusion <- NULL + rf$err.rate <- NULL + if (haveTest) { + rf$test$confusion <- NULL + rf$err.rate <- NULL + } + } else { + rf$mse <- rf$rsq <- NULL + if (haveTest) rf$test$mse <- rf$test$rsq <- NULL + } + rf } diff -Nru r-cran-randomforest-4.6-10/R/margin.R r-cran-randomforest-4.6-12/R/margin.R --- r-cran-randomforest-4.6-10/R/margin.R 2014-07-17 12:18:42.000000000 +0000 +++ r-cran-randomforest-4.6-12/R/margin.R 2015-10-06 18:28:23.000000000 +0000 @@ -37,8 +37,8 @@ if (sort) x <- sort(x) nF <- factor(names(x)) nlevs <- length(levels(nF)) - if ( require(RColorBrewer) && nlevs < 12) { - pal <- brewer.pal(nlevs,"Set1") + if ( requireNamespace("RColorBrewer", quietly=TRUE) && nlevs < 12) { + pal <- RColorBrewer::brewer.pal(nlevs,"Set1") } else { pal <- rainbow(nlevs) } diff -Nru r-cran-randomforest-4.6-10/R/MDSplot.R r-cran-randomforest-4.6-12/R/MDSplot.R --- r-cran-randomforest-4.6-10/R/MDSplot.R 2014-07-17 12:18:42.000000000 +0000 +++ r-cran-randomforest-4.6-12/R/MDSplot.R 2015-10-06 18:28:23.000000000 +0000 @@ -9,8 +9,8 @@ colnames(rf.mds$points) <- paste("Dim", 1:k) nlevs <- nlevels(fac) if (is.null(palette)) { - palette <- if (require(RColorBrewer) && nlevs < 12) - brewer.pal(nlevs, "Set1") else rainbow(nlevs) + palette <- if (requireNamespace("RColorBrewer", quietly = TRUE) && nlevs < 12) + RColorBrewer::brewer.pal(nlevs, "Set1") else rainbow(nlevs) } if (k <= 2) { plot(rf.mds$points, col=palette[as.numeric(fac)], pch=pch, ...) diff -Nru r-cran-randomforest-4.6-10/R/randomForest.default.R r-cran-randomforest-4.6-12/R/randomForest.default.R --- r-cran-randomforest-4.6-10/R/randomForest.default.R 2014-07-17 12:18:42.000000000 +0000 +++ r-cran-randomforest-4.6-12/R/randomForest.default.R 2015-10-06 18:28:23.000000000 +0000 @@ -80,6 +80,7 @@ } } else { ncat <- rep(1, p) + names(ncat) <- colnames(x) xlevels <- as.list(rep(0, p)) } maxcat <- max(ncat) @@ -358,7 +359,8 @@ proximity = if(proximity) matrix(rfout$proxts, nrow=ntest, dimnames = list(xts.row.names, c(xts.row.names, x.row.names))) else NULL), - inbag = if (keep.inbag) rfout$inbag else NULL) + inbag = if (keep.inbag) matrix(rfout$inbag, nrow=nrow(rfout$inbag), + dimnames=list(x.row.names, NULL)) else NULL) } else { ymean <- mean(y) y <- y - ymean diff -Nru r-cran-randomforest-4.6-10/src/regrf.c r-cran-randomforest-4.6-12/src/regrf.c --- r-cran-randomforest-4.6-10/src/regrf.c 2014-07-17 12:18:43.000000000 +0000 +++ r-cran-randomforest-4.6-12/src/regrf.c 2015-10-06 18:28:23.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************* - Copyright (C) 2001-2012 Leo Breiman, Adele Cutler and Merck & Co., Inc. + Copyright (C) 2001-2015 Leo Breiman, Adele Cutler and Merck & Co., Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -150,7 +150,7 @@ for (n = 0; n < *sampsize; ++n) { xrand = unif_rand(); k = xrand * nsample; - in[k] = 1; + in[k] += 1; yb[n] = y[k]; for(m = 0; m < mdim; ++m) { xb[m + n * mdim] = x[m + k * mdim]; @@ -164,7 +164,7 @@ k = nind[ktmp]; swapInt(nind[ktmp], nind[last]); last--; - in[k] = 1; + in[k] += 1; yb[n] = y[k]; for(m = 0; m < mdim; ++m) { xb[m + n * mdim] = x[m + k * mdim]; diff -Nru r-cran-randomforest-4.6-10/src/rf.c r-cran-randomforest-4.6-12/src/rf.c --- r-cran-randomforest-4.6-10/src/rf.c 2014-07-17 12:18:43.000000000 +0000 +++ r-cran-randomforest-4.6-12/src/rf.c 2015-10-06 18:28:23.000000000 +0000 @@ -25,7 +25,7 @@ #include #include "rf.h" -void oob(int nsample, int nclass, int *jin, int *cl, int *jtr,int *jerr, +void oob(int nsample, int nclass, int *cl, int *jtr,int *jerr, int *counttr, int *out, double *errtr, int *jest, double *cutoff); void TestSetError(double *countts, int *jts, int *clts, int *jet, int ntest, @@ -255,7 +255,7 @@ k = strata_idx[n][ktmp]; tclasspop[cl[k] - 1] += classwt[cl[k] - 1]; win[k] += classwt[cl[k] - 1]; - jin[k] = 1; + jin[k] += 1; } } } else { /* stratified sampling w/o replacement */ @@ -275,7 +275,7 @@ last--; tclasspop[cl[k] - 1] += classwt[cl[k]-1]; win[k] += classwt[cl[k]-1]; - jin[k] = 1; + jin[k] += 1; } } } @@ -291,7 +291,7 @@ k = unif_rand() * nsample; tclasspop[cl[k] - 1] += classwt[cl[k]-1]; win[k] += classwt[cl[k]-1]; - jin[k] = 1; + jin[k] += 1; } } else { for (n = 0; n < nsample; ++n) nind[n] = n; @@ -303,7 +303,7 @@ last--; tclasspop[cl[k] - 1] += classwt[cl[k]-1]; win[k] += classwt[cl[k]-1]; - jin[k] = 1; + jin[k] += 1; } } /* check if any class is missing in the sample */ @@ -379,7 +379,7 @@ } /* Compute out-of-bag error rate. */ - oob(nsample, nclass, jin, cl, jtr, jerr, counttr, out, + oob(nsample, nclass, cl, jtr, jerr, counttr, out, errtr + jb*(nclass+1), outcl, cut); if ((jb+1) % trace == 0) { @@ -611,7 +611,7 @@ Modified by A. Liaw 1/10/2003 (Deal with cutoff) Re-written in C by A. Liaw 3/08/2004 */ -void oob(int nsample, int nclass, int *jin, int *cl, int *jtr,int *jerr, +void oob(int nsample, int nclass, int *cl, int *jtr,int *jerr, int *counttr, int *out, double *errtr, int *jest, double *cutoff) { int j, n, noob, *noobcl, ntie; diff -Nru r-cran-randomforest-4.6-10/src/rfutils.c r-cran-randomforest-4.6-12/src/rfutils.c --- r-cran-randomforest-4.6-10/src/rfutils.c 2014-07-17 12:18:43.000000000 +0000 +++ r-cran-randomforest-4.6-12/src/rfutils.c 2015-10-06 18:28:24.000000000 +0000 @@ -230,7 +230,7 @@ for (i = 0; i < n; ++i) { for (j = i+1; j < n; ++j) { if (oobprox) { - if (! (inbag[i] || inbag[j]) ) { + if (! (inbag[i] > 0 || inbag[j] > 0) ) { oobpair[j*n + i] ++; oobpair[i*n + j] ++; if (node[i] == node[j]) {