On Wed, 30 May 2007, Feng Qiu wrote:

> Hi all:
>
>               I'm developing an application in which I use standard data to
> train the model in LDA and use the trained model to predict on test data. I
> can't train the model every time when I do prediction. So I need to save the
> trained model onto disk after the first training. Does anybody have idea
> about this? You help is highly appreciated.

The object lda() returns (assuming you are using lda) is all you need to 
do prediction.  So just use save() to 'save it to disk', and load() to 
retrieve it when you need it again.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to