From: Karina on
Hi,
I need help with the classification of data points.
I have the following array:
StaveRows:
96
100
103
107
111
140
144
147
148
151
155
205
206
209
213
216
217
220
250
253
254
257
261
264
265
315
318
319
323
326
330
359
363
366
367
370
374
424
425
428
432
435
436
439
469
472
476
479
480
483
The array represents the coordinates of the Staves in the music score. The problem is that some error points present.So I plotted them into graph (the points are - y axe points) and they visually form 8 groups(8 staves) on the graph. I though, maybe I can classify them into groups and then find the errors.
What kind of classification is better? I tried to use k means clustering, it didnt work. I think it can work for only 1 iteration. Is there a way to make k means clustering only for 1 iteration?
From: Greg Heath on
On Mar 2, 2:29 pm, "Karina " <miss.v...(a)gmail.com> wrote:
> Hi,
> I need help with the classification of data points.
> I have the following array:
> StaveRows:
>     96
>    100
>    103
>    107
>    111
>    140
>    144
>    147
>    148
>    151
>    155
>    205
>    206
>    209
>    213
>    216
>    217
>    220
>    250
>    253
>    254
>    257
>    261
>    264
>    265
>    315
>    318
>    319
>    323
>    326
>    330
>    359
>    363
>    366
>    367
>    370
>    374
>    424
>    425
>    428
>    432
>    435
>    436
>    439
>    469
>    472
>    476
>    479
>    480
>    483
> The array represents the coordinates of the Staves in the music score. The problem is that some error points present.So I plotted them into graph (the points are - y axe points) and they visually form 8 groups(8 staves) on the graph. I though, maybe I can classify them into groups and then find the errors.
> What kind of classification is better? I tried to use k means clustering, it didnt work. I think it can work for only 1 iteration. Is there a way to make k means clustering only for 1 iteration?

help diff

Hope this helps.

Greg
From: Peter Perkins on
On 3/2/2010 2:29 PM, Karina wrote:
> The array represents the coordinates of the Staves in the music score.
> The problem is that some error points present.So I plotted them into
> graph (the points are - y axe points) and they visually form 8 groups(8
> staves) on the graph. I though, maybe I can classify them into groups
> and then find the errors. What kind of classification is better? I tried
> to use k means clustering, it didnt work. I think it can work for only 1
> iteration. Is there a way to make k means clustering only for 1 iteration?

KMEANS does indeed work on these data. As the doc says,

<http://www.mathworks.com/access/helpdesk/help/toolbox/stats/bq_679x-18.html>

"Like many other types of numerical minimizations, the solution that kmeans reaches often depends on the starting points. ... However, you can use the optional 'replicates' parameter to overcome that problem."

So for example,

cidx = kmeans(x,8,'Replicates',10);
plot(cidx,x,'.');

From: Karina on
Peter Perkins <Peter.Perkins(a)MathRemoveThisWorks.com> wrote in message <hmll6d$i25$1(a)fred.mathworks.com>...
> On 3/2/2010 2:29 PM, Karina wrote:
> > The array represents the coordinates of the Staves in the music score.
> > The problem is that some error points present.So I plotted them into
> > graph (the points are - y axe points) and they visually form 8 groups(8
> > staves) on the graph. I though, maybe I can classify them into groups
> > and then find the errors. What kind of classification is better? I tried
> > to use k means clustering, it didnt work. I think it can work for only 1
> > iteration. Is there a way to make k means clustering only for 1 iteration?
>
> KMEANS does indeed work on these data. As the doc says,
>
> <http://www.mathworks.com/access/helpdesk/help/toolbox/stats/bq_679x-18.html>
>
> "Like many other types of numerical minimizations, the solution that kmeans reaches often depends on the starting points. ... However, you can use the optional 'replicates' parameter to overcome that problem."
>
> So for example,
>
It works! Thanx a lot!
> cidx = kmeans(x,8,'Replicates',10);
> plot(cidx,x,'.');
From: Peter Perkins on
On 3/4/2010 11:08 PM, Karina wrote:
> Peter Perkins <Peter.Perkins(a)MathRemoveThisWorks.com> wrote in message
>> cidx = kmeans(x,8,'Replicates',10);
>> plot(cidx,x,'.');

I should probably point out that since you already know that the centroids will be at something close to 1:8, you could also have provided that as an explicit starting point, and used only one replicate. But I don't know how general your code needs to be.
 |  Next  |  Last
Pages: 1 2
Prev: Report Generator IO Documentation
Next: Substring????