Prev: putmatrix
Next: scatter3
From: Kesede on
"Tom Lane" <tlane(a)mathworks.com> wrote in message <ftvs3h$lsp$1(a)fred.mathworks.com>...
> "pires " <piresloh7(a)gmail.com> wrote in message
> news:fts83v$b63$1(a)fred.mathworks.com...
> > No matter how i configure...Also failed. can u provide me
> > example...
>
> Here I use kmeans on the Fisher iris data, starting with the three species
> means. I plot the results and compare the clusters to the known species.
>
> -- Tom
>
> >> load fisheriris
> >> m = grpstats(meas,species)
> m =
> 5.0060 3.4280 1.4620 0.2460
> 5.9360 2.7700 4.2600 1.3260
> 6.5880 2.9740 5.5520 2.0260
> >> g = kmeans(meas,3,'start',m);
> >> gplotmatrix(meas,[],g)
> >> crosstab(g,species)
> ans =
> 50 0 0
> 0 48 14
> 0 2 36
>
>

I executed his example and I obtained the same answer that I have been obtaining in my application, or be:

??? In an assignment A(I) = B, the number of elements in B and
I must be the same.

Error in ==> prwaitbar at 159
N(DEPTH) = n; % complete the admin

Error in ==> kmeans at 57
prwaitbar(maxit,'k-means clustering');

I already verified the code of the prwaitbar and I didn't get to solve the problem. Would know how to tell me how it could avoid this mistake?

Thank you very much!!
From: Pekka Kumpulainen on
"Kesede " <kesedejulio(a)gmail.com> wrote in message <hjc420$gq3$1(a)fred.mathworks.com>...
> "Tom Lane" <tlane(a)mathworks.com> wrote in message <ftvs3h$lsp$1(a)fred.mathworks.com>...
> > "pires " <piresloh7(a)gmail.com> wrote in message
> > news:fts83v$b63$1(a)fred.mathworks.com...
> > > No matter how i configure...Also failed. can u provide me
> > > example...
> >
> > Here I use kmeans on the Fisher iris data, starting with the three species
> > means. I plot the results and compare the clusters to the known species.
> >
> > -- Tom
> >
> > >> load fisheriris
> > >> m = grpstats(meas,species)
> > m =
> > 5.0060 3.4280 1.4620 0.2460
> > 5.9360 2.7700 4.2600 1.3260
> > 6.5880 2.9740 5.5520 2.0260
> > >> g = kmeans(meas,3,'start',m);
> > >> gplotmatrix(meas,[],g)
> > >> crosstab(g,species)
> > ans =
> > 50 0 0
> > 0 48 14
> > 0 2 36
> >
> >
>
> I executed his example and I obtained the same answer that I have been obtaining in my application, or be:
>
> ??? In an assignment A(I) = B, the number of elements in B and
> I must be the same.
>
> Error in ==> prwaitbar at 159
> N(DEPTH) = n; % complete the admin
>
> Error in ==> kmeans at 57
> prwaitbar(maxit,'k-means clustering');
>
> I already verified the code of the prwaitbar and I didn't get to solve the problem. Would know how to tell me how it could avoid this mistake?
>
> Thank you very much!!

Are you sure you are using the kmeans provided in the stats toolbox? Type
which kmeans

In my installations 2009a or 2010a the stats toolbox versions of kmeans don't have use anything called prwaitbar.
From: Kesede on
"Pekka Kumpulainen" <pekka.nospam.kumpulainen(a)tut.please.fi> wrote in message <hjc725$r17$1(a)fred.mathworks.com>...
> "Kesede " <kesedejulio(a)gmail.com> wrote in message <hjc420$gq3$1(a)fred.mathworks.com>...
> > "Tom Lane" <tlane(a)mathworks.com> wrote in message <ftvs3h$lsp$1(a)fred.mathworks.com>...
> > > "pires " <piresloh7(a)gmail.com> wrote in message
> > > news:fts83v$b63$1(a)fred.mathworks.com...
> > > > No matter how i configure...Also failed. can u provide me
> > > > example...
> > >
> > > Here I use kmeans on the Fisher iris data, starting with the three species
> > > means. I plot the results and compare the clusters to the known species.
> > >
> > > -- Tom
> > >
> > > >> load fisheriris
> > > >> m = grpstats(meas,species)
> > > m =
> > > 5.0060 3.4280 1.4620 0.2460
> > > 5.9360 2.7700 4.2600 1.3260
> > > 6.5880 2.9740 5.5520 2.0260
> > > >> g = kmeans(meas,3,'start',m);
> > > >> gplotmatrix(meas,[],g)
> > > >> crosstab(g,species)
> > > ans =
> > > 50 0 0
> > > 0 48 14
> > > 0 2 36
> > >
> > >
> >
> > I executed his example and I obtained the same answer that I have been obtaining in my application, or be:
> >
> > ??? In an assignment A(I) = B, the number of elements in B and
> > I must be the same.
> >
> > Error in ==> prwaitbar at 159
> > N(DEPTH) = n; % complete the admin
> >
> > Error in ==> kmeans at 57
> > prwaitbar(maxit,'k-means clustering');
> >
> > I already verified the code of the prwaitbar and I didn't get to solve the problem. Would know how to tell me how it could avoid this mistake?
> >
> > Thank you very much!!
>
> Are you sure you are using the kmeans provided in the stats toolbox? Type
> which kmeans
>
> In my installations 2009a or 2010a the stats toolbox versions of kmeans don't have use anything called prwaitbar

I typed,
>> which kmeans
C:\Matlab\toolbox\stats\kmeans.m

my version is 7.0.0.19920 (R14), what could be?
From: Tom Lane on
>> > I executed his example and I obtained the same answer that I have been
>> > obtaining in my application, or be:
>> >
>> > ??? In an assignment A(I) = B, the number of elements in B and
>> > I must be the same.
>> >
>> > Error in ==> prwaitbar at 159
>> > N(DEPTH) = n; % complete the admin
>> >
>> > Error in ==> kmeans at 57
>> > prwaitbar(maxit,'k-means clustering');
....
> I typed,
>>> which kmeans
> C:\Matlab\toolbox\stats\kmeans.m

There is a non-MathWorks thing called prtools. I don't know what it is, but
it has a kmeans function, a crossval function, and a prwaitbar function. It
appears you were calling the prtools function originally. But then later,
when you issued the "which" command, you didn't see that. I can't explain
the difference.

If you give the command

which kmeans -all

you may see both the Statistics Toolbox version and the prtools version. If
so, try temporarily removing prtools from your path. (Or just cd out of that
directory if that's where you are.) If you just see the statistics one
again, try repeating the example to see if it works this time.

-- Tom


From: Kesede on
"Tom Lane" <tlane(a)mathworks.com> wrote in message <hjcm2j$e8s$1(a)fred.mathworks.com>...
> >> > I executed his example and I obtained the same answer that I have been
> >> > obtaining in my application, or be:
> >> >
> >> > ??? In an assignment A(I) = B, the number of elements in B and
> >> > I must be the same.
> >> >
> >> > Error in ==> prwaitbar at 159
> >> > N(DEPTH) = n; % complete the admin
> >> >
> >> > Error in ==> kmeans at 57
> >> > prwaitbar(maxit,'k-means clustering');
> ...
> > I typed,
> >>> which kmeans
> > C:\Matlab\toolbox\stats\kmeans.m
>
> There is a non-MathWorks thing called prtools. I don't know what it is, but
> it has a kmeans function, a crossval function, and a prwaitbar function. It
> appears you were calling the prtools function originally. But then later,
> when you issued the "which" command, you didn't see that. I can't explain
> the difference.
>
> If you give the command
>
> which kmeans -all
>
> you may see both the Statistics Toolbox version and the prtools version. If
> so, try temporarily removing prtools from your path. (Or just cd out of that
> directory if that's where you are.) If you just see the statistics one
> again, try repeating the example to see if it works this time.
>
> -- Tom
>
Tom, thank you, thank you, thank you. Thank you very much!! Resolved problem.
 | 
Pages: 1
Prev: putmatrix
Next: scatter3