NEWS | R Documentation |
predict
now works when trees aren't saved, for use in testing
Metropolis-Hasting steps.
Varying intercepts model for probit regression.
A hyperpriors for k
has now been implemented. Passing
k = chi(degreesOfFreedom, scale)
now penalizes small values of
k
, encouraging more shrinkage.
Hyperprior of chi(1.25, Inf)
is now default for bart2
with binary outcomes. The default accuracy should improve substantially
xbart
divides data correctly with random subsampling.
More control over cut points has been added. It is now possible to specify
the cut points for a variable once and subsequently change that predictor
without also modifying the cuts using sampler$setCutPoints
and
sampler$setPredictor
.
sampler$getTrees
implemented to get a flattened, depth-first down
left traversal of the trees.
For sampler$setPredictor
, an argument specifies whether or not to
rollback or force the change if the new data would result in a leaf
having 0 observations.
pdbart
and pd2bart
now work with formula/data specifications,
as well as taking models or samplers that have previously stored trees.
Stores x
as integer matrix of the max of which cut point an observation is
to the left of, by default using 16 bit integers. Limited to 65535 cut points.
That can be increased with some special compilation instructions.
Uses CPU dispatch and SIMD instructions for some operations. This and the integer
x
make BART about 30% faster on datasets of around 10k observations.
Saved trees are stored using significantly less memory.
plot
now works for fits from rbart_vi
.
rbart_vi
new reports varcount
.
bart2
now defaults to not storing trees due to the memory cost.
bart2
now defaults to using quantile rules to decide splits.
predict
for binary outcomes now correct.
Fix for verbose multithreading on Linux, reported by @ignacio82 on github.
General improvements to slice sampler in rbart_vi
thanks to reports from Yutao Liu.
sampler$plotTree
now handles multiple chains correctly.
Negative log loss for xbart
with binary outcomes should now be computed correctly.
rbart_vi
fits a simple varying intercept, random effects model.
Now natively supports multiple chains running in parallel.
Objects fit by bart
can be used with the predict generic
when instructed to save the trees.
New function bart2
introduced, similar to bart
but with
more efficient default parameters.
dbartsControl
has had two parameters renamed: numSamples
is now defaultNumSamples
and numBurnIn
is now
defaultNumBurnIn
.
dbartsControl
supports parameters runMode
,
n.chains
, rngKind
and rngNormalKind
.
In the C interface, a new function (setRNGState
) has been
added to specify the states of the random number generators, of which there
is now one for every chain.
State objects saved by the handles no longer contain the total fits, since they can be rebuild from the tree fits. States are also lists of objects now, with one corresponding to each chain. Tree fits and strings are matrices corresponding to the number of trees and saved samples.
random subsampling crossvalidation (xbart
) has been implemented
in C++. Refits model using current set of trees for changes in
hyperparameters n.trees
, k
, power
, and base
.
Natively parallelized.
Rudimentary tree plotting added to sampler (sampler$plotTree
).
Exported dbartsData
as a way of constructing data objects
and setting the data seen by the sampler all at once. Sampler now supports
sampler$setData()
.
keepevery
argument to bart
matches BayesTree
.
bart
now has argument keepcall
to suppress
storing the call object.
bart
now accepts a weights
argument.
MakeModelMatrixFromDataFrame
now implemented in C, supports
an argument for tracking/keeping dropped values from factors.
Usage of weights was causing incorrect updates to posterior for σ^2.
Should now JIT byte compile correctly.
Cuts derived from quantiles should now be valid.
Uses a rejection sampler to simulated binary latent variables (CP Robert 2009, http://arxiv.org/pdf/0907.4010.pdf). Code thanks to Jared Murray.
Now encapsulates its own random number generator, so that the C++ objects can safely be used in parallel. Shouldn't affect pure-R users unless their RNG has non-exported state (i.e. Box-Muller normal kind).
Includes a offset.test
vector that can be controlled
independently of the offset
vector, but in general inherits
behavior from it. Set at creation with dbarts()
or after
with setTestOffset
or setTestPredictorAndOffset
.
By default, no longer attempts to obtain identical results as
BayesTree. To recover this behavior, compile from source with
configure.args = "--enable-match-bayes-tree"
.
Changing the entirety of the test matrix using setTestPredictor
no longer allowed. Use setTestPredictors
instead.
Changing the predictor can now result in failure if the covariates
would leave an end-node empty. setPredictor
returns a logical
as to success.
Saved dbarts
objects may not be compatible and should be
re-created to be sure of valdity.
Now requires R versions >= 3.1.0.
Corrected binary latent variable sampler and no longer multiply adds offset (reported by Jared Murray).
Relatively embarassing bug related to loop-unrolling when n mod 5 != 0
fixed.
Correct aggregation of results for multithreaded variance calculations.
More equitably distributed tasks across multiple threads.
Makevars tweaked to allow compilation on Ubuntu.
Initial public release.