perf(nn)
perf
uses a hold-out method. This
method takes the training set used by the function
learn
and iterate over each observation
trying to guess the current observation with a reduced
training set (without the current observation).It
generates: observed
and guessed
values. success
and fails
, a
sucess rate (success_rate
) and a bic
indicator. pnn-package
, learn
,
smooth
, guess
,
norms
library(pnn)
data(norms)
pnn <- learn(norms)
pnn <- smooth(pnn, sigma=0.8)
pnn <- perf(pnn)
pnn$observed
pnn$guessed
pnn$success
pnn$fails
pnn$success_rate
pnn$bic
Run the code above in your browser using DataLab