Changes in version 0.9-31 NEW FEATURES o `predict` now accepts a `n.threads` argument and will use native threads to parallelize across chains. USER-VISIBLE CHANGES o 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 o `rbart_vi` no longer fails when there are multiple out-of-sample grouping factors in test data. Bug report thanks to github user drcthal. o Should now correctly install on non-Mac OS arm64 systems. Bug report thanks to Bob Dröge. o `rbart_vi` now works when `k` is a variable. Bug report thanks to Bruno Tancredi. Changes in version 0.9-29 BUG FIXES o `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. o Installs correctly on Alpine Linux. Bug report thanks to Sebastian Meyer. Changes in version 0.9-27 BUG FIXES o 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 o 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 (2023-01-23) NEW FEATURES o No longer depends on gfortran. o Uses SIMD instructions on M1 Macs. o Added experimental callback functionality to rbart_vi. USER-VISIBLE CHANGES o Custom loss functiosn for xbart now require an additional weights argument. BUG FIXES o Fixed a multithreaded issue leading to inconsistent results with xbart. o rbart_vi should now correctly use default arguments. o rbart_vi now works with keepTrainingFits as false. o Weighted binary responses sample latent variables from the correct distribution. o Extracting the values from the posterior predictive distribution for models with weights now incorporates them into the variance. o Weighted values are considered in loss functions for crossvalidation. Changes in version 0.9-21 NEW FEATURES o extract now accepts as a type "trees", which allows for easier inspection of models fit with "keepTrees" as TRUE. o print generics now exist for bart and rbart fits; implementation thanks to Emil Hvitfeldt. o xbart now accepts a seed argument to enhance reproducibility. o bart/bart2 (and dbarts through its tree.prior argument) accept splitprobs/ split.probs which controls the prior probability that any variable is used when splitting observations. USER-VISIBLE CHANGES o fitted for rbart_vi models now uses a C++ implementation for the expected value that uses less memory and is faster. BUG FIXES o xbart for 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 (2021-10-08) NEW FEATURES o dbarts now exposes access to the underlying proposal rules and their probabilities through its proposal.probs argument. bart2 response to the same argument, while bart uses proposalprobs. o bart, bart2, and rbart_vi accept a seed argument that will yield reproducible results, even when running with multiple threads and multiple chains. USER-VISIBLE CHANGES o The interface registered under R_RegisterCCallable has changed to reflect proper fixed hyperpriors for k. o Samples of the end-node sensitivity parameter, k, are returned by rbart_vi when it modeled. o Burn-in samples of the end-node sensitivity parameter, k, are included in the results of bart, bart2, and rbart_vi. o rbart_vi will now look for group.by and group.by.test in the data and test arguments before looking in the formula or calling environments. BUG FIXES o Fix for k mixing across chains when running multithreaded and with k being modeled. Bug report thanks to Noah Greifer. o Fix for xbart with method = "k-fold" when data not evenly divided by number of folds. Rug report thanks to Jesse (@ALEXLANGLANG on Github). o Sampler method getLatents and corresponding C function now add user supplied offset to result. o Saved, flattened trees now correctly partition observations on left and right. Changes in version 0.9-19 (2021-01-05) NEW FEATURES o Samplers now have method sampleNodeParametersFromPrior. When used in conjunction with sampleTreesFromPrior allow the model to fully make predictions from the prior distribution. o dbartsControl (and now bart/bart2 through ...) now accept rngSeed argument. 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. o C interface supports dbarts_createStateExpression and dbarts_initializeState which can be used to re-create samplers that were allocated using forked multithreading. o C interface also supports dbarts_predict, dbarts_setControl, and dbarts_printTrees. o Exports makeTestModelMatrix to allow package authors to create test data at a later point from training data. USER-VISIBLE CHANGES o varcount for bart fits now has dimnames set. o residuals generic added to bart and rbart_vi. BUG FIXES o Parallelization for rbart now creates the correct number of chains. o Should now compile on non-x86 architectures. Report thanks to Lars Viklund. o Fixed hang when verbose = TRUE for multiple threads and multiple chains. Report thanks to Noah Greifer. o Fixed potential memory access errors when recreating sample from saved state. o Correctly de-serializes saved tree structure. Changes in version 0.9-18 (2020-06-12) NEW FEATURES o Sampler now explicitly supports setSigma for use in hierarchical models. o Sampler function setOffset has an additional argument of updateScale. When the response is continuous and updateScale is TRUE, 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 o Extraneous print line from debugging 0.9-17. o Eliminated two race conditions from multithreaded crossvalidation. Report thanks to Ignacio Martinez. o Eliminated garbage read on construction of crossvalidation sampler, removing inconsistencies across multiple runs with the same starting seed. o makeModelMatrixFromDataFrame now converts character vectors to factors instead of dropping them. Report thanks to Colin Carlson. Changes in version 0.9-17 (2020-03-20) BUG-FIXES o Memory leak for predict when keepTrees is FALSE. Changes in version 0.9-16 (2020-02-19) NEW FEATURES o Added extract and fitted generics for bart models. 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 with fitted.glm, "response" can be used as a synonym for "ev" and "link" can be used as a synonym for "bart". USER-VISIBLE CHANGES o predict for bart models with binary outcomes returns a result on the probability scale, not probit. The argument value is deprecated - use type instead. o predict further conforms to the same system of arguments as extract and fitted. BUG-FIXES o xbart with a k-hyperprior should no longer crash. Report thanks to Colin Carlson. Changes in version 0.9-14 NEW FEATURES o Fits from rbart_vi now work with generics fitted, extract, and predict. extract retrieves samples from the posterior distribution for the training and test samples, fitted applies averages across those samples, while predict can be used to obtain values for completely new observations. USER-VISIBLE CHANGES o predict for rbart_vi takes 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 o save/load should work correctly. Report thanks to Jeremy Coyle. Changes in version 0.9-13 (2019-09-24) USER-VISIBLE CHANGES o predict now works when trees aren't saved, for use in testing Metropolis-Hasting proposals. o The offset slot no longer changes the relative scaling of the response. This stabilizes predictions across iterations. For a semantic where the scaling does change, use setResponse instead. Changes in version 0.9-12 (2019-05-24) NEW FEATURES o Varying intercepts model for probit regression. Changes in version 0.9-10 NEW FEATURES o A hyperpriors for k has now been implemented. Passing k = chi(degreesOfFreedom, scale) now penalizes small values of k, encouraging more shrinkage. USER-VISIBLE CHANGES o Hyperprior of chi(1.25, Inf) is now default for bart2 with binary outcomes. The default accuracy should improve substantially. BUG-FIXES o xbart divides data correctly with random subsampling. Changes in version 0.9-9 NEW FEATURES o 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. o sampler$getTrees implemented to get a flattened, depth-first down left traversal of the trees. USER-VISIBLE CHANGES o 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. o pdbart and pd2bart now work with formula/data specifications, as well as taking models or samplers that have previously stored trees. OPTIMIZATIONS o 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. o 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. o Saved trees are stored using significantly less memory. Changes in version 0.9-8 (2018-12-18) NEW FEATURES o plot now works for fits from rbart_vi. USER-VISIBLE CHANGES o rbart_vi new reports varcount. o bart2 now defaults to not storing trees due to the memory cost. o bart2 now defaults to using quantile rules to decide splits. BUG-FIXES o predict for binary outcomes now correct. o Fix for verbose multithreading on Linux, reported by @ignacio82 on github. o General improvements to slice sampler in rbart_vi thanks to reports from Yutao Liu. o sampler$plotTree now handles multiple chains correctly. o Negative log loss for xbart with binary outcomes should now be computed correctly. Changes in version 0.9-2 NEW FEATURES o rbart_vi fits a simple varying intercept, random effects model. Changes in version 0.9-0 (2018-03-03) NEW FEATURES o Now natively supports multiple chains running in parallel. o Objects fit by bart can be used with the predict generic when instructed to save the trees. o New function bart2 introduced, similar to bart but with more efficient default parameters. USER-VISIBLE CHANGES o dbartsControl has had two parameters renamed: numSamples is now defaultNumSamples and numBurnIn is now defaultNumBurnIn. o dbartsControl supports parameters runMode, n.chains, rngKind and rngNormalKind. o 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. o 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 (2016-10-31) NEW FEATURES o 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. o Rudimentary tree plotting added to sampler (sampler$plotTree). o 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(). USER-VISIBLE CHANGES o keepevery argument to bart matches BayesTree. o bart now has argument keepcall to suppress storing the call object. o bart now accepts a weights argument. o MakeModelMatrixFromDataFrame now implemented in C, supports an argument for tracking/keeping dropped values from factors. BUG-FIXES o Usage of weights was causing incorrect updates to posterior for sigma^2. o Should now JIT byte compile correctly. o Cuts derived from quantiles should now be valid. Changes in version 0.8-4 (2014-11-11) NEW FEATURES o Uses a rejection sampler to simulated binary latent variables (CP Robert 2009, http://arxiv.org/pdf/0907.4010.pdf). Code thanks to Jared Murray. o 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). o 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. USER-VISIBLE CHANGES o 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". o Changing the entirety of the test matrix using setTestPredictor no longer allowed. Use setTestPredictors instead. o Changing the predictor can now result in failure if the covariates would leave an end-node empty. setPredictor returns a logical as to success. o Saved dbarts objects may not be compatible and should be re-created to be sure of valdity. o Now requires R versions >= 3.1.0. BUG FIXES o Corrected binary latent variable sampler and no longer multiply adds offset (reported by Jared Murray). o Relatively embarassing bug related to loop-unrolling when n mod 5 != 0 fixed. o Correct aggregation of results for multithreaded variance calculations. o More equitably distributed tasks across multiple threads. o Makevars tweaked to allow compilation on Ubuntu. Changes in version 0.8-3 (2014-07-14) o Initial public release.