
Don't forget that you can also use different types of unsupervised classification methods, such as the fuzzy k-means as implemented in the "kmeans" method.

Here is an example (with landform classes):
http://spatial-analyst.net/wiki/index.php?title=Analysis_of_DEMs_in_R%2BILWIS/SAGA

If you work with large grids, consider also using R+SAGA:
https://stat.ethz.ch/pipermail/r-sig-geo/2009-February/005155.html


T. Hengl



-----Original Message-----
From: r-sig-geo-bounces@stat.math.ethz.ch on behalf of Edzer Pebesma
Sent: Fri 4/17/2009 5:32 PM
To: Corey Sparks
Cc: r-sig-geo@stat.math.ethz.ch
Subject: Re: [R-sig-Geo] image classification in R
 
Corey,

you can use functions lda or qda (in library MASS) for linear or
quadratic discriminant analysis, respectively, on your training/ground
truth data, and then use the predict method on the resulting objects,
passing the bands (you need to convert the SpatialGridDataFrame to a
data.frame) as newdata to obtain the classified pixels. Make sure that
the band names have identical name in both cases. Then assign the
predicted class to the SpatialGridDataFrame and export.

It has never been clear to me whether "maximum likelihood
classification" in RS refers to lda or qda. Anyway, it's called
discriminant analysis in the statistical literature.
--
Edzer


Corey Sparks wrote:
> Dear list,
> I want to do some unsupervised image classification of some landsat
> imagery, I think I can read in the multi-band rasters using rgdal, but
> has anyone tried doing this in R?  I am thinking (after looking at
> documentation for how GRASS and ArcGIS do it) that I need to do an
> initial hierarchical clustering to define clusters, but does anyone
> have an idea on how to do a maximum likelihood classification of the
> imagery?  Would a discriminant function approach work?  Any advice
> anyone may have would be greatly appreciated, and i'm very sorry but I
> don't have a working example yet.
> Best
>
> Corey
>
> Corey Sparks
> Assistant Professor
> Department of Demography and Organization Studies
> University of Texas at San Antonio
> One UTSA Circle
> San Antonio, TX 78249
> 210 458 6858
> corey.sparks 'at' utsa.edu
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma@wwu.de

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



	[[alternative HTML version deleted]]

