Skip to content

Commit 9b1ec98

Browse files
authored
Merge branch 'kogalur:main' into master
2 parents 2f2cf8a + bb1d7f0 commit 9b1ec98

File tree

172 files changed

+33553
-43267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+33553
-43267
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: randomForestSRC
2-
Version: 3.4.1
3-
Date: 2025-06-08
2+
Version: 3.4.2
3+
Date: 2025-09-30
44
Title: Fast Unified Random Forests for Survival, Regression, and Classification (RF-SRC)
55
Authors@R: c(person("Hemant", "Ishwaran", email = "[email protected]", role = "aut"),
66
person("Udaya B.", "Kogalur", email = "[email protected]", role = c("aut", "cre")))

NAMESPACE

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ importFrom("grDevices", "gray")
2121
export(extract.bootsample,
2222
extract.quantile,
2323
extract.subsample,
24-
find.interaction,
25-
find.interaction.rfsrc,
2624
get.auc,
2725
get.bayes.rule,
2826
get.brier.error,
@@ -47,7 +45,6 @@ export(extract.bootsample,
4745
get.quantile.crps,
4846
get.quantile.stat,
4947
get.rfq.threshold,
50-
5148
get.tree,
5249
get.tree.rfsrc,
5350
holdout.vimp,
@@ -75,6 +72,7 @@ export(extract.bootsample,
7572
print.rfsrc,
7673
print.bootsample,
7774
print.bootsample.rfsrc,
75+
print.imbalanced.performance,
7876
print.subsample,
7977
print.subsample.rfsrc,
8078
quantreg,
@@ -84,16 +82,11 @@ export(extract.bootsample,
8482
rfsrc.cart,
8583
rfsrc.fast,
8684
rfsrc.news,
87-
synthetic.rfsrc,
88-
synthetic,
8985
sid.perf.metric,
9086
sidClustering,
9187
sidClustering.rfsrc,
92-
9388
subsample,
9489
subsample.rfsrc,
95-
stat.split,
96-
stat.split.rfsrc,
9790
tune,
9891
tune.rfsrc,
9992
tune.nodesize,
@@ -132,6 +125,7 @@ S3method(predict, rfsrc)
132125
S3method(print, rfsrc)
133126
S3method(print, bootsample)
134127
S3method(print, bootsample.rfsrc)
128+
S3method(print, imbalanced.performance)
135129
S3method(print, subsample)
136130
S3method(print, subsample.rfsrc)
137131

R/find.interaction.rfsrc.R

Lines changed: 0 additions & 183 deletions
This file was deleted.

R/generic.predict.rfsrc.R

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ generic.predict.rfsrc <-
1919
seed = NULL,
2020
do.trace = FALSE,
2121
membership = FALSE,
22-
statistics = FALSE,
2322
marginal.xvar = NULL,
2423
...)
2524
{
@@ -153,7 +152,7 @@ generic.predict.rfsrc <-
153152
}
154153
else {
155154
object.version <- as.integer(unlist(strsplit(object$version, "[.]")))
156-
installed.version <- as.integer(unlist(strsplit("3.4.1", "[.]")))
155+
installed.version <- as.integer(unlist(strsplit("3.4.2", "[.]")))
157156
minimum.version <- as.integer(unlist(strsplit("2.3.0", "[.]")))
158157
object.version.adj <- object.version[1] + (object.version[2]/10) + (object.version[3]/100)
159158
installed.version.adj <- installed.version[1] + (installed.version[2]/10) + (installed.version[3]/100)
@@ -469,7 +468,6 @@ generic.predict.rfsrc <-
469468
rfq <- get.rfq(rfq)
470469
rfq.bits <- get.rfq.bits(rfq, family)
471470
gk.quantile.bits <- get.gk.quantile.bits(gk.quantile)
472-
statistics.bits <- get.statistics.bits(statistics)
473471
bootstrap.bits <- get.bootstrap.bits(object$bootstrap)
474472
## initialize the low bits
475473
ensemble.bits <- get.ensemble.bits(ensemble)
@@ -517,30 +515,16 @@ generic.predict.rfsrc <-
517515
}
518516
na.action.bits <- get.na.action.bits(na.action)
519517
do.trace <- get.trace.bits(do.trace)
520-
## Check that hdim is initialized. If not, set it zero.
521-
## This is necessary for backwards compatibility with 2.3.0
522-
if (is.null(object$hdim)) {
523-
hdim <- 0
524-
}
525-
else {
526-
hdim <- object$hdim
527-
}
528518
## The pivot in this predict related function is different from
529519
## the pivot used in the grow related function. In rfsrc we are
530520
## referencing the list nativeOutput[[]]. Here we are referencing
531521
## the $nativeArray[[]] object which is a massaged version of
532-
## nativeOutput[[]]. Here, pivot points to the record PRIOR to
533-
## parmID2. We adjust for the presence of interactions, and
534-
## synthetics. The default chunk is parmIDx, contPTx, contPTRx,
535-
## mwcpSZx, fsrecIDx.
522+
## nativeOutput[[]].
536523
## WARNING: Note that the maximum number of slots in the following
537524
## foreign function call is 64. Ensure that this limit is not
538525
## exceeded. Otherwise, the program will error on the call.
539-
if (hdim == 0) {
540526
pivot = 0
541527
chunk = 0
542-
}
543-
544528
## set the maximum class levels
545529
max.class.levels <- 0
546530
## Start the C external timer.
@@ -559,7 +543,6 @@ generic.predict.rfsrc <-
559543
rfq.bits +
560544
cr.bits +
561545
gk.quantile.bits +
562-
statistics.bits +
563546
anonymize.bits +
564547
case.depth.bits),
565548
as.integer(forest.wt.bits +
@@ -620,9 +603,9 @@ generic.predict.rfsrc <-
620603
list(as.integer(object$seed),
621604
if (is.null(object$seedVimp)) NULL else as.integer(object$seedVimp),
622605
as.integer(object$optLoGrow)),
623-
as.integer(hdim),
624-
## Object containing base learner settings. This is never NULL.
625-
object$base.learner,
606+
as.integer(0),
607+
## Deleted base learner slot.
608+
NULL,
626609
as.integer((object$nativeArray)$treeID),
627610
as.integer((object$nativeArray)$nodeID),
628611
as.integer((object$nativeArray)$nodeSZ),
@@ -633,23 +616,6 @@ generic.predict.rfsrc <-
633616
as.integer((object$nativeArray)$mwcpSZ),
634617
as.integer((object$nativeArray)$fsrecID),
635618
if (is.null((object$nativeFactorArray)$mwcpPT)) NULL else as.integer((object$nativeFactorArray)$mwcpPT)),
636-
## as.integer((object$nativeFactorArray)$mwcpPT)),
637-
## This slot is hc_one_augm_intr. This slot can be NULL.
638-
if (!is.null(object$base.learner)) {
639-
if (object$base.learner$interact.depth > 1) {
640-
list(as.integer((object$nativeArray)$pairCT),
641-
as.integer((object$nativeArray)$augmXone),
642-
as.integer((object$nativeArray)$augmXtwo))
643-
} else { NULL }
644-
} else { NULL },
645-
## This slot is hc_one_augm_syth. This slot can be NULL.
646-
if (!is.null(object$base.learner)) {
647-
if (object$base.learner$synthetic.depth > 1) {
648-
list(as.integer((object$nativeArray)$sythSZ),
649-
as.integer((object$nativeArray)$augmXS))
650-
} else { NULL }
651-
} else { NULL },
652-
653619
NULL,
654620
NULL,
655621
NULL,
@@ -661,8 +627,8 @@ generic.predict.rfsrc <-
661627
NULL,
662628
NULL,
663629
NULL,
664-
665-
630+
NULL,
631+
NULL,
666632
as.integer(object$nativeArrayTNDS$tnRMBR),
667633
as.integer(object$nativeArrayTNDS$tnAMBR),
668634
as.integer(object$nativeArrayTNDS$tnRCNT),
@@ -879,14 +845,6 @@ generic.predict.rfsrc <-
879845
else {
880846
split.depth.out <- NULL
881847
}
882-
## node statistics
883-
if (statistics == TRUE) {
884-
node.stats <- as.data.frame(cbind(nativeOutput$spltST))
885-
names(node.stats) <- c("spltST")
886-
}
887-
else {
888-
node.stats <- NULL
889-
}
890848
## make the output object
891849
rfsrcOutput <- list(
892850
call = match.call(),
@@ -913,7 +871,6 @@ generic.predict.rfsrc <-
913871
imputed.indv = (if (n.miss>0) imputed.indv else NULL),
914872
imputed.data = (if (n.miss>0) imputed.data else NULL),
915873
split.depth = split.depth.out,
916-
node.stats = node.stats,
917874
block.size = block.size,
918875
perf.type = perf.type,
919876
ctime.internal = nativeOutput$cTimeInternal,
@@ -933,7 +890,6 @@ generic.predict.rfsrc <-
933890
if (n.miss > 0) remove(imputed.data)
934891
remove(var.used.out)
935892
remove(split.depth.out)
936-
remove(node.stats)
937893
## Safe the outputs.
938894
survOutput <- NULL
939895
classOutput <- NULL

0 commit comments

Comments
 (0)