predict.dynaTree | R Documentation |
Predicting and calculating sequential design and optimization statistics at new design points (i.e., active learning heuristics) for dynamic tree models
## S3 method for class 'dynaTree'
predict(object, XX, yy = NULL, quants = TRUE,
ei = FALSE, verb = 0, ...)
## S3 method for class 'dynaTree'
coef(object, XX, verb = 0, ...)
object |
a |
XX |
a design |
yy |
an optional vector of “true” responses at the |
quants |
a scalar |
ei |
a scalar |
verb |
a positive scalar integer indicating how many predictive locations
(iterations) after which a progress statement should be
printed to the console; a (default) value of |
... |
to comply with the generic |
predict
returns predictive summary statistics by averaging over the
samples from the posterior predictive distribution obtained
from each of the particles in the cloud pointed to by the
object (object
)
coef returns a matrix of regression coefficients used in linear
model leaves (model = "linear"
) leaves, averaged over all particles,
for each XX
location. For other models it prints a warning and
defaults to predict
.
The value(s) calculated are appended to object
; the new
fields are described below
Note that ALC calculations have been moved to the alc.dynaTree
function(s)
The object returned is of class "dynaTree"
, which includes a
copy of the list elements from the object
passed in,
with the following (predictive)
additions depending on whether object$model
is for
regression ("constant"
or "linear"
) or classification
("class"
).
For regression:
mean |
a vector containing an estimate of the predictive mean
at the |
vmean |
a vector containing an estimate of the variance of predictive mean
at the |
var |
a vector containing an estimate of the predictive
variance (average variance plus variance of mean) at the |
df |
a vector containing the average degrees of freedom at the |
q1 |
a vector containing an estimate of the 5% quantile of
the predictive distribution at the |
q2 |
a vector containing an estimate of the 95% quantile of
the predictive distribution at the |
yypred |
if |
ei |
a vector containing an estimate of the EI statistic,
unless |
;
For classification:
p |
a |
entropy |
a |
;
For coef
a new RXXc field is created so as not to trample
on XX
s that may have been used in a previous predict
,
plus
coef |
a |
matrix of particle- averaged regression coefficients.
Robert B. Gramacy rbg@vt.edu,
Matt Taddy and Christoforos Anagnostopoulos
Taddy, M.A., Gramacy, R.B., and Polson, N. (2011). “Dynamic trees for learning and design” Journal of the American Statistical Association, 106(493), pp. 109-123; arXiv:0912.1586
https://bobby.gramacy.com/r_packages/dynaTree/
dynaTree
, update.dynaTree
,
plot.dynaTree
, alc.dynaTree
,
entropyX.dynaTree
## see the example(s) section(s) of dynaTree and
## update.dynaTree and the demos (demo(package=dynaTree))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.