A toy dataset

Share:

Description

A matrix consisting of 10 rows and 6 columns corresponding to 10 points in a six-dimensional space.

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
     data(toy)
     real.relation <- function(x){sum( (1:6)*x )}

     d <- apply(toy, 1, real.relation)

     # Supply some scales:
     fish <- rep(2,6)

     # Calculate the A matrix:
     A <- corr.matrix(toy,scales=fish)
     Ainv <- solve(A)

     # Now add some suitably correlated noise:
     d.noisy <- as.vector(rmvnorm(n=1,mean=d, 0.1*A))

     # Choose a point:
     x.unknown <- rep(0.5,6)

     # Now use interpolant:
     interpolant(x.unknown, d.noisy, toy, Ainv, scales=fish, g=FALSE)


     # Now verify by checking the first row of toy:
     interpolant(toy[1,], d.noisy, toy, Ainv, scales=fish, g=FALSE)
     # Should match d.noisy[1].