comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » clustering
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Clustering [message #78182 is a reply to message #54850] Mon, 31 October 2011 04:56 Go to previous messageGo to previous message
kidpix is currently offline  kidpix
Messages: 23
Registered: July 2007
Junior Member
Hi Kai,
to mee it make a lot of sense. It looks similar to what I'm doing with spectra.

I assume you have a 50 bands - 2000x360=720000 pixels images.

I'm using CLUSTER_TREE to classify all the spectra, there is as sample of what I do.


;- fake data
seed_value = 5L
K_max = 20
J_max = 36
A = RANDOMN(seed, K_max, 50, J_max)

;-- histogram from pixel K=J=0 A[K,*,J]
K=0
J=0
plot,HISTOGRAM(A[K,*,J],BINSIZE=(max(A)-min(A))/149,MIN=min( A),MAX=max(A)),psym=10

help,A(*,0,*) ;-- 2000x360 pixels images
help,A(0,*,0) ;-- each image has 50 bands

;-- assemble the histogram array
Histo_A = fltarr(K_max, 150, J_max)

for K=0,K_max-1 do for J=0,J_max-1 do Histo_A[K,*,J]= HISTOGRAM(A[K,*,J],BINSIZE=(max(A)-min(A))/149,MIN=min(A),MA X=max(A))

help,Histo_A

;-- arrange the data as a [K_max*J_max, 150] array
Histo_A_array = fltarr(K_max*J_max, 150)
for K=0,K_max-1 do for J=0,J_max-1 do Histo_A_array[K*J,*] = Histo_A[K,*,J]

;-- Clusterization using cluster_tree
distance_matrix = DISTANCE_MEASURE(Histo_A_array, MEASURE = 0,/matrix
clusters_dend = CLUSTER_TREE(distance_matrix,linkdistance,LINKAGE=2,data=His to_A_array,MEASURE=0)

cluster_matrix = cluster_member(clusters_dend)



The only problem is that you have to explore the whole cluster_matrix and decide which are meaningful clusters to you.
[the cluster_member comes from https://groups.google.com/forum/#!topic/comp.lang.idl-pvwave /UUVL0MkS0zE]

Cheers,
Mario.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Move data to structure fields without copying
Next Topic: Annotate Uncertainty [Upper & Lower] on a plot?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:21:47 PDT 2025

Total time taken to generate the page: 0.00439 seconds