Kirsten Barrett
2008-Nov-11 03:38 UTC
[R] Apology RE:interpreting output from predict.blackboost
I apologize for multiple postings of the question below. My email responded with error messages each time I attempted to post and the postings did not appear in my sent messages. I was not aware (until notified) that multiple copies had been sent. Kirsten Barrett On Mon, Nov 10, 2008 at 4:02 PM, Kirsten Barrett <kbarrett at usgs.gov> wrote:> I would like to use blackboost on a training data set, then use the > output to predict a testing dataset, and finally evaluate the errors. > An example of the code I have written is the following: > > train <- read.csv ("train.csv") > test <- read.csv ("test.csv") > > boost <- blackboost (ogred ~ elev + slope + aspect, data = train) > pred <- predict (boost, newdata = test) > > pred yields the following matrix: > > [1] 2.697689 3.551352 2.761541 3.271642 2.313459 2.207247 1.591521 3.752257 > [9] 2.976793 2.522219 1.988676 2.092666 3.550917 2.134925 2.534842 2.922136 > [17] 2.277653 2.922136 2.922136 4.593132 2.922136 3.773274 4.647789 3.773274 > [25] 4.647789 2.369810 2.645859 2.344808 1.760087 2.918108 2.714825 2.972284 > [33] 3.466973 2.001098 1.706958 1.749830 1.960923 1.960923 2.451370 2.835255 > [41] 2.443585 3.392883 3.164294 2.615430 > > I would like to know how to use this output to classify data the > testing dataset. Any advice is much appreciated. > > Thank you, > Kirsten > > -- > Kirsten Barrett > Mendenhall Postdoctoral Fellow, USGS > Alaska Science Center > 4210 University Drive > Anchorage, AK > > phone (907) 786 7419 > fax (907) 786 7401 > > kbarrett at usgs.gov >-- Kirsten Barrett Mendenhall Postdoctoral Fellow, USGS Alaska Science Center 4210 University Drive Anchorage, AK phone (907) 786 7419 fax (907) 786 7401 kbarrett at usgs.gov