| NEWS | R Documentation |
dbarts News
CHANGES IN VERSION 0.9-31
NEW FEATURES
'predict' now accepts a 'n.threads' argument and will use native threads to parallelize across chains.
USER-VISIBLE CHANGES
When running with multiple threads, threads no longer persist after 'run'ing or 'predict'ing and will be re-created on the next call. Prior to this, threads were initialized at object creation and would run in the background for the life-cycle of the sampler object, waiting for work. To prevent frequent stopping/starting of threads, new sampler-object functions 'startThreads()' and 'stopThreads()' have been added that can bookend sampling or prediction loops.
BUG FIXES
'rbart_vi' no longer fails when there are multiple out-of-sample grouping factors in test data. Bug report thanks to github user drcthal.
Should now correctly install on non-Mac OS arm64 systems. Bug report thanks to Bob Dröge.
'rbart_vi' now works when 'k' is a variable. Bug report thanks to Bruno Tancredi.
CHANGES IN VERSION 0.9-29
BUG FIXES
'dbarts' now works to initialize a sampler for binary outcomes when 'resid.prior' is left at its default. Bug report thanks to github user LennMass.
Installs correctly on Alpine Linux. Bug report thanks to Sebastian Meyer.
CHANGES IN VERSION 0.9-27
BUG FIXES
Fixed an error in sampler when setting test offsets when there was only a single test observation.
CHANGES IN VERSION 0.9-24
USER-VISIBLE CHANGES
Issues a warning instead of failing when weights are present in training data but not present in test. Suggestion thanks to github user Pentaonia (Loubert).
CHANGES IN VERSION 0.9-23
NEW FEATURES
No longer depends on gfortran.
Uses SIMD instructions on M1 Macs.
Added experimental
callbackfunctionality torbart_vi.
USER-VISIBLE CHANGES
Custom loss functiosn for
xbartnow require an additional weights argument.
BUG FIXES
Fixed a multithreaded issue leading to inconsistent results with
xbart.-
rbart_vishould now correctly use default arguments. -
rbart_vinow works withkeepTrainingFitsas false. Weighted binary responses sample latent variables from the correct distribution.
Extracting the values from the posterior predictive distribution for models with weights now incorporates them into the variance.
Weighted values are considered in loss functions for crossvalidation.
CHANGES IN VERSION 0.9-21
NEW FEATURES
-
extractnow accepts as a type"trees", which allows for easier inspection of models fit with"keepTrees"asTRUE. -
printgenerics now exist forbartandrbartfits; implementation thanks to Emil Hvitfeldt. -
xbartnow accepts aseedargument to enhance reproducibility. -
bart/bart2(anddbartsthrough itstree.priorargument) acceptsplitprobs/split.probswhich controls the prior probability that any variable is used when splitting observations.
USER-VISIBLE CHANGES
-
fittedforrbart_vimodels now uses a C++ implementation for the expected value that uses less memory and is faster.
BUG FIXES
-
xbartfor binary outcomes with log loss no longer returns NaN when some subset of the response is perfectly predicted by the covariates. Bug report thanks to Marcela Veselkova.
CHANGES IN VERSION 0.9-20
NEW FEATURES
-
dbartsnow exposes access to the underlying proposal rules and their probabilities through itsproposal.probsargument.bart2response to the same argument, whilebartusesproposalprobs. -
bart,bart2, andrbart_viaccept aseedargument that will yield reproducible results, even when running with multiple threads and multiple chains.
USER-VISIBLE CHANGES
The interface registered under
R_RegisterCCallablehas changed to reflect proper fixed hyperpriors fork.Samples of the end-node sensitivity parameter,
k, are returned byrbart_viwhen it modeled.Burn-in samples of the end-node sensitivity parameter,
k, are included in the results ofbart,bart2, andrbart_vi.-
rbart_viwill now look forgroup.byandgroup.by.testin thedataandtestarguments before looking in theformulaor calling environments.
BUG FIXES
Fix for
kmixing across chains when running multithreaded and withkbeing modeled. Bug report thanks to Noah Greifer.Fix for
xbartwithmethod = "k-fold"when data not evenly divided by number of folds. Rug report thanks to Jesse (@ALEXLANGLANG on Github).Sampler method
getLatentsand corresponding C function now add user supplied offset to result.Saved, flattened trees now correctly partition observations on left and right.
CHANGES IN VERSION 0.9-19
NEW FEATURES
Samplers now have method
sampleNodeParametersFromPrior. When used in conjunction withsampleTreesFromPriorallow the model to fully make predictions from the prior distribution.-
dbartsControl(and nowbart/bart2through...) now acceptrngSeedargument. This can be used to generate reproducible results with multiple threads. It should only be used for testing, as the thread-specific pRNGs are seeded using sequential draws from a pRNG created with the user-supplied seed. C interface supports
dbarts_createStateExpressionanddbarts_initializeStatewhich can be used to re-create samplers that were allocated using forked multithreading.C interface also supports
dbarts_predict,dbarts_setControl, anddbarts_printTrees.Exports
makeTestModelMatrixto allow package authors to create test data at a later point from training data.
USER-VISIBLE CHANGES
-
varcountforbartfits now has dimnames set. -
residualsgeneric added tobartandrbart_vi.
BUG FIXES
Parallelization for
rbartnow creates the correct number of chains.Should now compile on non-x86 architectures. Report thanks to Lars Viklund.
Fixed hang when
verbose = TRUEfor multiple threads and multiple chains. Report thanks to Noah Greifer.Fixed potential memory access errors when recreating sample from saved state.
Correctly de-serializes saved tree structure.
CHANGES IN VERSION 0.9-18
NEW FEATURES
Sampler now explicitly supports
setSigmafor use in hierarchical models.Sampler function
setOffsethas an additional argument ofupdateScale. When the response is continuous andupdateScaleisTRUE, the implicit scaling, effecting the node parameters' variance, is adjusted to match the range of the new data. This optionally reverts the change of version 0.9-13 with the intention of being used only during warmup when using an offset that is itself being sampled.
BUG-FIXES
Extraneous print line from debugging 0.9-17.
Eliminated two race conditions from multithreaded crossvalidation. Report thanks to Ignacio Martinez.
Eliminated garbage read on construction of crossvalidation sampler, removing inconsistencies across multiple runs with the same starting seed.
-
makeModelMatrixFromDataFramenow converts character vectors to factors instead of dropping them. Report thanks to Colin Carlson.
CHANGES IN VERSION 0.9-17
BUG-FIXES
Memory leak for
predictwhenkeepTreesisFALSE.
CHANGES IN VERSION 0.9-16
NEW FEATURES
Added
extractandfittedgenerics forbartmodels. Respects"train"and"test"sets of observations while returning"ev"- samples from the posterior of the individual level expected value,"bart"- the sum of trees component; same as"ev"for linear models but on the probit scale for binary ones, and"ppd"- samples from the posterior predictive distribution. To synergize withfitted.glm,"response"can be used as a synonym for"ev"and"link"can be used as a synonym for"bart".
USER-VISIBLE CHANGES
-
predictforbartmodels with binary outcomes returns a result on the probability scale, not probit. The argumentvalueis deprecated - usetypeinstead. -
predictfurther conforms to the same system of arguments asextractandfitted.
BUG-FIXES
-
xbartwith a k-hyperprior should no longer crash. Report thanks to Colin Carlson.
CHANGES IN VERSION 0.9-14
NEW FEATURES
Fits from
rbart_vinow work with genericsfitted,extract, andpredict.extractretrieves samples from the posterior distribution for the training and test samples,fittedapplies averages across those samples, whilepredictcan be used to obtain values for completely new observations.
USER-VISIBLE CHANGES
-
predictforrbart_vitakes value "ev" instead of "post-mean" to clarify what is being returned, i.e. samples from the posterior distribution of the observation-level expected values.
BUG-FIXES
-
save/loadshould work correctly. Report thanks to Jeremy Coyle.
CHANGES IN VERSION 0.9-13
USER-VISIBLE CHANGES
-
predictnow works when trees aren't saved, for use in testing Metropolis-Hasting proposals. The
offsetslot no longer changes the relative scaling of the response. This stabilizes predictions across iterations. For a semantic where the scaling does change, usesetResponseinstead.
CHANGES IN VERSION 0.9-12
NEW FEATURES
Varying intercepts model for probit regression.
CHANGES IN VERSION 0.9-10
NEW FEATURES
A hyperpriors for
khas now been implemented. Passingk = chi(degreesOfFreedom, scale)now penalizes small values ofk, encouraging more shrinkage.
USER-VISIBLE CHANGES
Hyperprior of
chi(1.25, Inf)is now default forbart2with binary outcomes. The default accuracy should improve substantially.
BUG-FIXES
-
xbartdivides data correctly with random subsampling.
CHANGES IN VERSION 0.9-9
NEW FEATURES
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$setCutPointsandsampler$setPredictor.-
sampler$getTreesimplemented to get a flattened, depth-first down left traversal of the trees.
USER-VISIBLE CHANGES
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.-
pdbartandpd2bartnow work with formula/data specifications, as well as taking models or samplers that have previously stored trees.
OPTIMIZATIONS
Stores
xas 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
xmake BART about 30% faster on datasets of around 10k observations.Saved trees are stored using significantly less memory.
CHANGES IN VERSION 0.9-8
NEW FEATURES
-
plotnow works for fits fromrbart_vi.
USER-VISIBLE CHANGES
-
rbart_vinew reportsvarcount. -
bart2now defaults to not storing trees due to the memory cost. -
bart2now defaults to using quantile rules to decide splits.
BUG-FIXES
-
predictfor binary outcomes now correct. Fix for verbose multithreading on Linux, reported by @ignacio82 on github.
General improvements to slice sampler in
rbart_vithanks to reports from Yutao Liu.-
sampler$plotTreenow handles multiple chains correctly. Negative log loss for
xbartwith binary outcomes should now be computed correctly.
CHANGES IN VERSION 0.9-2
NEW FEATURES
-
rbart_vifits a simple varying intercept, random effects model.
CHANGES IN VERSION 0.9-0
NEW FEATURES
Now natively supports multiple chains running in parallel.
Objects fit by
bartcan be used with the predict generic when instructed to save the trees.New function
bart2introduced, similar tobartbut with more efficient default parameters.
USER-VISIBLE CHANGES
-
dbartsControlhas had two parameters renamed:numSamplesis nowdefaultNumSamplesandnumBurnInis nowdefaultNumBurnIn. -
dbartsControlsupports parametersrunMode,n.chains,rngKindandrngNormalKind. 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.
CHANGES IN VERSION 0.8-6
NEW FEATURES
random subsampling crossvalidation (
xbart) has been implemented in C++. Refits model using current set of trees for changes in hyperparametersn.trees,k,power, andbase. Natively parallelized.Rudimentary tree plotting added to sampler (
sampler$plotTree).Exported
dbartsDataas a way of constructing data objects and setting the data seen by the sampler all at once. Sampler now supportssampler$setData().
USER-VISIBLE CHANGES
-
keepeveryargument tobartmatchesBayesTree. -
bartnow has argumentkeepcallto suppress storing the call object. -
bartnow accepts aweightsargument. -
MakeModelMatrixFromDataFramenow implemented in C, supports an argument for tracking/keeping dropped values from factors.
BUG-FIXES
Usage of weights was causing incorrect updates to posterior for
\sigma^2.Should now JIT byte compile correctly.
Cuts derived from quantiles should now be valid.
CHANGES IN VERSION 0.8-4
NEW FEATURES
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.testvector that can be controlled independently of theoffsetvector, but in general inherits behavior from it. Set at creation withdbarts()or after withsetTestOffsetorsetTestPredictorAndOffset.
USER-VISIBLE CHANGES
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
setTestPredictorno longer allowed. UsesetTestPredictorsinstead.Changing the predictor can now result in failure if the covariates would leave an end-node empty.
setPredictorreturns a logical as to success.Saved
dbartsobjects may not be compatible and should be re-created to be sure of valdity.Now requires R versions >= 3.1.0.
BUG FIXES
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 != 0fixed.Correct aggregation of results for multithreaded variance calculations.
More equitably distributed tasks across multiple threads.
Makevars tweaked to allow compilation on Ubuntu.
CHANGES IN VERSION 0.8-3
Initial public release.