Grokbase Groups R r-help April 2012
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
like this:
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:

Hey all,

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:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

Drew Tyre

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

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupr-help @
postedApr 10, '12 at 11:01a
activeApr 10, '12 at 3:37p

2 users in discussion

Drew Tyre: 1 post Motte: 1 post



site design / logo © 2022 Grokbase