|| at Apr 10, 2012 at 3:37 pm
The key to using cv.glm is that you have to have a fitted model object with
all the data to validate. In your case, that would appear to be a model
where NDI is calculated from two bands in the dataframe base. However, if
the ground truth data is independently collected from the imagery (the
usual case), then there is no need to do cross validation - the model above
is all you need? If you repeat the model above for all pairwise
combinations of bands, then comparing the models using R^2 or some other
metric would tell you which band combination is superior.
On Tue, Apr 10, 2012 at 6:01 AM, Motte wrote:
I need some help with a cross validation. I'm new with R and as well with
statistics. I had a group work to create a tool for remote sensing class
that extracts the best bands of hyperspectral satellite images that
vegetation. Its a regression between a linear function of using a
differenced index (i-j)/(i+j) while i and j are the bands (in the data
are the columns, expect the last column) and the ground truth data which is
listed in the last column in %.
We did a manual cross validation (described below), but as the code is too
long and confusing, we'd like to use the cv.glm function out of the boot
package. We've tried it several times, but we don't know how to do ist.
Could anybody help us?
This is our current code for the tool with a manual cross validation:
Thanks a lot,
View this message in context:http://r.789695.n4.nabble.com/Package-boot-funtion-cv-glm-tp4545275p4545275.html
Sent from the R help mailing list archive at Nabble.com.
PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
School of Natural Resources
University of Nebraska-Lincoln
416 Hardin Hall, East Campus
3310 Holdrege Street
Lincoln, NE 68583-0974
phone: +1 402 472 4054
fax: +1 402 472 2946