https://github.com/cran/tgp
Revision e2440d43ce37a7adb76d184432e9bbdb537ace2c authored by Robert B. Gramacy on 24 February 2006, 18:06:09 UTC, committed by cran-robot on 24 February 2006, 18:06:09 UTC
1 parent 5456136
Tip revision: e2440d43ce37a7adb76d184432e9bbdb537ace2c authored by Robert B. Gramacy on 24 February 2006, 18:06:09 UTC
version 1.1
version 1.1
Tip revision: e2440d4
tgp.choose.as.R
#*******************************************************************************
#
# Bayesian Regression and Adaptive Sampling with Gaussian Process Trees
# Copyright (C) 2005, University of California
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Questions? Contact Robert B. Gramacy (rbgramacy@ams.ucsc.edu)
#
#*******************************************************************************
"tgp.choose.as" <-
function(out, as)
{
# choose AS stats to plot
if(is.null(as)) {
X <- rbind(out$X, out$XX)
criteria <- c(out$Zp.q, out$ZZ.q)
name <- "error"
} else {
X <- out$XX
criteria <- out$ZZ.q
name <- "ALM stats"
if(as == "alc") {
if(is.null(out$Ds2x)) cat("NOTICE: out$Ds2x is NULL, using ALM\n")
else { criteria <- out$Ds2x; name <- "ALC stats" }
} else if(as == "ego") {
if(is.null(out$ego)) cat("NOTICE: out$ego is NULL, using ALM\n")
else { criteria <- out$ego; name <- "EGO stats" }
}
}
return(list(X=X, criteria=criteria, name=name))
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...