help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programming error in Octave pattern classification code?


From: Francesco Potortì
Subject: Re: Programming error in Octave pattern classification code?
Date: Sat, 07 Jul 2012 01:29:42 +0200

>I have written the Octave code below to "brute force" classify a pattern into
>one of five categories contained in a vector y, but as it stands it is
>performing no better than random (accuracy 20%), which is a surprise to me.
>
>First, a line from X (a 324,000 by 54 matrix) is randomly extracted, then a
>new matrix is extracted from X where all the lines with the same term in the
>first column as the initial random selection are the same. This produces a
>9000 by 54 matrix look_up_matrix, and should include the initial random
>selection. Then the closest match, in an Euclidean distance sense, is sought
>and via index extraction the matching category is looked up in y. Since the
>Euclidean distance between the initial random selection and itself in the
>look_up_matrix should be zero I would expect an accuracy approaching 100%.
>Can anyone point out any errors in the given code?

babelproofreader,

I have not the time to debug your code.  Maybe someone has, but as a
general rule, you can try your code with a smaller dataset: that should
help finding the problem as you can inspect variables by hand.  For
example, you can reduce the size of your huge matrix, and put 'keyboard'
statements in your code so that you can see how things are proceeding.

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111)
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Fax:    +39.050.315.2040  
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


reply via email to

[Prev in Thread] Current Thread [Next in Thread]