predictRelWarps | R Documentation |
predict relative warps for data not included in the training data set
predictRelWarps(x, newdata, noalign = FALSE)
x |
output from |
newdata |
k x m x n array holding new landmark data |
noalign |
logical: if TRUE, data is assumed to be already aligned to training data and alignment is skipped. |
This function aligns the new data to the mean from x
and transforms it into the relative warp space computed from the training data.
returns a list containing
bescores |
relative warp scores (PC-scores if |
uniscores |
uniform scores, NULL if |
data(boneData)
set.seed(42)
training <- sample(1:80,size=60)
rW1 <- relWarps(boneLM[,,training], alpha = -1)
## predict scores for the entire sample
predAll <- predictRelWarps(rW1,boneLM)
## now compare the scores predicted scores to the original ones
layout(matrix(1:4,2,2))
for (i in 1:2) {
plot(rW1$bescores[,i],predAll$bescores[training,i],main=paste("RW",i))
plot(rW1$uniscores[,i],predAll$uniscores[training,i],main=paste("UC",i))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.