Hello, I use lda (package: MASS) to obtain a lda object, then want to employ this object to do the prediction for the new data like below: predict(object, newdata, dimen=1, method=c("plug-in", "predictive", "debiased")) What is the exact difference among the three methods? What is the difference of prediction results when applying different method? Thank you, Shengzhe
On Fri, 26 Aug 2005, Shengzhe Wu wrote:> I use lda (package: MASS) to obtain a lda object, then want to employ > this object to do the prediction for the new data like below: > > predict(object, newdata, dimen=1, method=c("plug-in", "predictive", "debiased"))That is not how you call it: when a character vector is given like that those are alternatives. Do read the help page, as we ask.> What is the exact difference among the three methods? What is the > difference of prediction results when applying different method?This is stated on the help page. If you are unfamiliar with the area, note that the posting guide points out that MASS is support software for a book and the explanations are in the book. The help page also has references: please do read them (before posting).> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- Brian D. Ripley, ripley at stats.ox.ac.uk 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
Thanks for your reply. Actually I called function as below. p1 = predict(object, newdata, dimen=1) p2 = predict(object, newdata, dimen=1, method=debiased) p3 = predict(object, newdata, dimen=1, method="predictive") The MAP classification of prediction results by any method are the same. I know what the method "plug-in" and "debiased" mean, but what does the "vague prior" for the method "predictive" mean? what is "vague" here? Thank you, Shengzhe On 8/26/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:> On Fri, 26 Aug 2005, Shengzhe Wu wrote: > > > I use lda (package: MASS) to obtain a lda object, then want to employ > > this object to do the prediction for the new data like below: > > > > predict(object, newdata, dimen=1, method=c("plug-in", "predictive", "debiased")) > > That is not how you call it: when a character vector is given like that > those are alternatives. Do read the help page, as we ask. > > > What is the exact difference among the three methods? What is the > > difference of prediction results when applying different method? > > This is stated on the help page. If you are unfamiliar with the area, > note that the posting guide points out that MASS is support software for a > book and the explanations are in the book. The help page also has > references: please do read them (before posting). > > > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > 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 >
On Fri, 26 Aug 2005, Shengzhe Wu wrote:> Thanks for your reply. Actually I called function as below. > > p1 = predict(object, newdata, dimen=1) > p2 = predict(object, newdata, dimen=1, method=debiased) > p3 = predict(object, newdata, dimen=1, method="predictive")So why did you say something different?> The MAP classification of prediction results by any method are the > same. I know what the method "plug-in" and "debiased" mean, but what > does the "vague prior" for the method "predictive" mean? what is > "vague" here?Please do as we ask, and read the book for which this is supporting material (on p.339, to save you looking in the index).> > Thank you, > Shengzhe > > > > On 8/26/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: >> On Fri, 26 Aug 2005, Shengzhe Wu wrote: >> >>> I use lda (package: MASS) to obtain a lda object, then want to employ >>> this object to do the prediction for the new data like below: >>> >>> predict(object, newdata, dimen=1, method=c("plug-in", "predictive", "debiased")) >> >> That is not how you call it: when a character vector is given like that >> those are alternatives. Do read the help page, as we ask. >> >>> What is the exact difference among the three methods? What is the >>> difference of prediction results when applying different method? >> >> This is stated on the help page. If you are unfamiliar with the area, >> note that the posting guide points out that MASS is support software for a >> book and the explanations are in the book. The help page also has >> references: please do read them (before posting). >> >>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >> >> -- >> Brian D. Ripley, ripley at stats.ox.ac.uk >> 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 >> > >-- Brian D. Ripley, ripley at stats.ox.ac.uk 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
I compared "posterior" of these three prediction results, they are a little different. The book you mentioned should be "Modern Applied Statistics with S. 4th edition". But this book has been borrowed out from our univeristy library by someone else, and I have checked the book "Pattern Recognition and Neural Networks" which does not mention these three lda prediction methods. Thanks you, Shengzhe On 8/26/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:> On Fri, 26 Aug 2005, Shengzhe Wu wrote: > > > Thanks for your reply. Actually I called function as below. > > > > p1 = predict(object, newdata, dimen=1) > > p2 = predict(object, newdata, dimen=1, method=debiased) > > p3 = predict(object, newdata, dimen=1, method="predictive") > > So why did you say something different? > > > The MAP classification of prediction results by any method are the > > same. I know what the method "plug-in" and "debiased" mean, but what > > does the "vague prior" for the method "predictive" mean? what is > > "vague" here? > > Please do as we ask, and read the book for which this is supporting > material (on p.339, to save you looking in the index). > > > > > Thank you, > > Shengzhe > > > > > > > > On 8/26/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: > >> On Fri, 26 Aug 2005, Shengzhe Wu wrote: > >> > >>> I use lda (package: MASS) to obtain a lda object, then want to employ > >>> this object to do the prediction for the new data like below: > >>> > >>> predict(object, newdata, dimen=1, method=c("plug-in", "predictive", "debiased")) > >> > >> That is not how you call it: when a character vector is given like that > >> those are alternatives. Do read the help page, as we ask. > >> > >>> What is the exact difference among the three methods? What is the > >>> difference of prediction results when applying different method? > >> > >> This is stated on the help page. If you are unfamiliar with the area, > >> note that the posting guide points out that MASS is support software for a > >> book and the explanations are in the book. The help page also has > >> references: please do read them (before posting). > >> > >>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >> > >> -- > >> Brian D. Ripley, ripley at stats.ox.ac.uk > >> 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 > >> > > > > > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > 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 >
On Fri, 26 Aug 2005, Shengzhe Wu wrote:> I compared "posterior" of these three prediction results, they are a > little different. > > The book you mentioned should be "Modern Applied Statistics with S. > 4th edition". But this book has been borrowed out from our univeristy > library by someone else,So please do request it and consult it, as you are using its support software. Note that the posting guide does asks you to mention if you have no access to the references.> and I have checked the book "Pattern > Recognition and Neural Networks" which does not mention these three > lda prediction methods.It does, in detail, in sections 2.4 and 2.5.> > Thanks you, > Shengzhe > > On 8/26/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: >> On Fri, 26 Aug 2005, Shengzhe Wu wrote: >> >>> Thanks for your reply. Actually I called function as below. >>> >>> p1 = predict(object, newdata, dimen=1) >>> p2 = predict(object, newdata, dimen=1, method=debiased) >>> p3 = predict(object, newdata, dimen=1, method="predictive") >> >> So why did you say something different? >> >>> The MAP classification of prediction results by any method are the >>> same. I know what the method "plug-in" and "debiased" mean, but what >>> does the "vague prior" for the method "predictive" mean? what is >>> "vague" here? >> >> Please do as we ask, and read the book for which this is supporting >> material (on p.339, to save you looking in the index). >> >>> >>> Thank you, >>> Shengzhe >>> >>> >>> >>> On 8/26/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: >>>> On Fri, 26 Aug 2005, Shengzhe Wu wrote: >>>> >>>>> I use lda (package: MASS) to obtain a lda object, then want to employ >>>>> this object to do the prediction for the new data like below: >>>>> >>>>> predict(object, newdata, dimen=1, method=c("plug-in", "predictive", "debiased")) >>>> >>>> That is not how you call it: when a character vector is given like that >>>> those are alternatives. Do read the help page, as we ask. >>>> >>>>> What is the exact difference among the three methods? What is the >>>>> difference of prediction results when applying different method? >>>> >>>> This is stated on the help page. If you are unfamiliar with the area, >>>> note that the posting guide points out that MASS is support software for a >>>> book and the explanations are in the book. The help page also has >>>> references: please do read them (before posting). >>>> >>>>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >>>> >>>> -- >>>> Brian D. Ripley, ripley at stats.ox.ac.uk >>>> 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 >>>> >>> >>> >> >> -- >> Brian D. Ripley, ripley at stats.ox.ac.uk >> 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 >> > >-- Brian D. Ripley, ripley at stats.ox.ac.uk 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
Hello, I use qda (package "MASS") to obtain an object. If there is any function to plot density plot of qda object with one dimension? Thank you, Shengzhe
On Sat, 27 Aug 2005, Shengzhe Wu wrote:> Hello, > > I use qda (package "MASS") to obtain an object. If there is any > function to plot density plot of qda object with one dimension$B!)(BThat makes no sense. qda objects do not have a density. Please do study the background material (as you have been repeatedly asked to do). -- Brian D. Ripley, ripley at stats.ox.ac.uk 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