[GRASS-user] strange behavior of i.cluster with sample=1,1

dear grass users,

i’m working on landsat imagery and i need to do some automatic classification so i’m doing several tests with i.cluster (first, after that i will also try i.cass or i.gensigset). As I wanted to see the impact of the “sample” parameter, i launch a script with several variations and i noticed this result: when the sample parameter is becoming smaller, i.cluster tend to converge to only 1 class …
I was thinking that with more samples the result will be more accurate but it seems to be the oposit … with the default value for sample, the result is always correct …

Is there something wrong with the fact to use sample=1,1 (or sample=10,10) instead of the default value sample=56,71 ?
for the moment i’m working with landsat 5 or 7 imagery, so in the case of land use with a very reduce location (ex: “small” rivers), having samples only each 56x15m=840m can occult some land use category …

I have the same error on gras 6.3 or 6.4, grass did’nt notice any error, and I have enought of ram (only 65% used) … do you have an idea of what is going wrong and what can i try to solve this problem?

I join the results of i.cluster with 20 classes and sample=1,1 parameter set, the others have default values => it goes wrong imediately … and with default sample (56,71), everything works …

Paramètres du cluster
Nombre de classes initiales: 20
Taille minimum de classe : 17
Séparation minimum entre classes: 0.000000
Pourcentage de convergence: 98.000000
Nombre maximum d’itérations: 30

Intervalle d’échantillonnage en ligne: 1
Intervalle d’échantillonnage en colonne: 1

Taille de l’échantillon : 40439680 points

[ …]

Distribution des classes
1826562 24892 450783 312030 852164
1646111 2323198 2780468 3019891 3214292
3472239 3559417 3246739 2739526 2249348
2013603 1977504 1754731 1225898 1750284

######## itération 1 ###########
2 classes, 0.01% points stables
Distribution des classes
38277534 0 0 0 0
0 0 0 0 0
0 2162146 0 0 0
0 0 0 0 0

######## itération 2 ###########
1 classes, 5.35% points stables
Distribution des classes
0 0 0 0 0
0 0 0 0 0
0 40439680 0 0 0
0 0 0 0 0

######## itération 3 ###########
1 classes, 100.00% points stables
Distribution des classes
0 0 0 0 0
0 0 0 0 0
0 40439680 0 0 0
0 0 0 0 0

-- 
Sylvain Maillard
Doctorant en Sciences de l'Environnement

Laboratoire Chimie Provence - UMR 6264 / Université de Provence

la Tour du Valat - Centre de recherche pour la conservation des zones humides méditerranéennes
Le Sambuc
13200 Arles
France
mail: [maillard@tourduvalat.org](mailto:maillard@tourduvalat.org)

tél:04.90.97.29.79
fax:04.90.97.20.19
[www.tourduvalat.org](http://www.tourduvalat.org/)