Last data update: 2014.03.03

R: Plot of the LML function by exhaustive search.
exhaustivePlotR Documentation

Plot of the LML function by exhaustive search.

Description

Exhaustively searches the hyperparameter space by a grid, whose resolution is passed as an argument, and plots the LML function for every point in the space.

Usage

 exhaustivePlot(y, x, xstar, options, maxwidth, res, nlevels)

Arguments

y

the target (output) data.

x

the input data matrix.

xstar

the points to predict function values.

options

options structure as defined by gpOptions.m.

maxwidth

maximum lengthscale to search for.

res

The search resolution. Number of points to plot for in the search range.

nlevels

Number of contour levels.

Value

area

Area under the ROC curve of method-A.

See Also

rocStats

Examples

  noiseLevel <- 0.2
  noiseVar <- noiseLevel^2
  options <- gpOptions()
  options$kern$comp <- list('rbf','white')
  ## Create data set
  l <- 9; x <- matrix(seq(0,240,by=20), ncol=1)
  trueKern <- kernCreate(x, 'rbf')
  trueKern$inverseWidth <- 1/(20^2) ## Characteristic inverse-width.
  K <- kernCompute(trueKern, x) + diag(dim(x)[1])*noiseVar
  ## Sample some true function values.
  y <- gaussSamp(Sigma=K, numSamps=1)
  xTest <- as.matrix(seq(0, 240, length=200))
  graphics.off(); dev.new(); plot.new(); dev.new(); plot.new()
  exhaustivePlot(y, x, xTest, options=options, maxwidth=100, res=50, nlevels=75)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(gprege)
Loading required package: gptk
Loading required package: Matrix
Loading required package: fields
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package: 'spam'

The following objects are masked from 'package:base':

    backsolve, forwardsolve

Loading required package: maps

 # maps v3.1: updated 'world': all lakes moved to separate new #
 # 'lakes' database. Type '?world' or 'news(package="maps")'.  #


> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/gprege/exhaustivePlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: exhaustivePlot
> ### Title: Plot of the LML function by exhaustive search.
> ### Aliases: exhaustivePlot
> 
> ### ** Examples
> 
>   noiseLevel <- 0.2
>   noiseVar <- noiseLevel^2
>   options <- gpOptions()
>   options$kern$comp <- list('rbf','white')
>   ## Create data set
>   l <- 9; x <- matrix(seq(0,240,by=20), ncol=1)
>   trueKern <- kernCreate(x, 'rbf')
>   trueKern$inverseWidth <- 1/(20^2) ## Characteristic inverse-width.
>   K <- kernCompute(trueKern, x) + diag(dim(x)[1])*noiseVar
>   ## Sample some true function values.
>   y <- gaussSamp(Sigma=K, numSamps=1)
>   xTest <- as.matrix(seq(0, 240, length=200))
>   graphics.off(); dev.new(); plot.new(); dev.new(); plot.new()
Error in dev.new() : no suitable unused file name for pdf()
Execution halted