[R] predict.kohonen som: what is the trainY parameter?

Gavin Simpson gavin.simpson at ucl.ac.uk
Sun Aug 16 22:00:36 CEST 2009


On Sun, 2009-08-16 at 19:59 +0200, Francesco Stablum wrote:
> Hello,
> I am quite new to R, and, after having used successfully the function
> "som" (package kohonen), I am trying to use the predict.kohonen
> function for pattern recognition under noise, but cannot find further
> documentation about the trainY parameter.
> 
> The documentation of predict.kohonen says about the trainY parameter:
> "Values for the dependent variable for the training data."
> 
> Anybody understands what does it mean?

It is the response data you used to fit the model you are predicting
from. Note that it also says this is needed if the fitted model was
created using the keep.data=FALSE option.

So the model was fitted using

trainY ~ trainX

where trainX are the predictor variables and trainY the response for the
training set samples used to fit the model.

HTH

G

> 
> thanks,
> Francesco Stablum
> 
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list