Re: Information-Theory functions.

Muthiah Annamalai <[email protected]> Thu, 28 Sep 2006 21:33:47 -0500
Newsgroups gmane.comp.gnu.octave.sources
Message-ID <1159497227.3646.37.camel@localhost>
On Thu, 2006-09-28 at 21:55 -0400, Paul Kienzle wrote:
> On Sep 28, 2006, at 7:55 PM, Muthiah Annamalai wrote:
> 
> > Hi there,
> > I have my first cut functions on basic functions in
> > Information Theory; the package is a nice candidate
> > for inclusion into Octave-forge. If Paul or David
> > can approve it, I can gohead and fix it according
> > to Octave-forge specifications.
> 
> 1) If you structure the initial comments as follows
> then it won't show up in the help string.
> 
> ## Copyright (C) ...
> ##
> ## This program is free software ...
> ## ...
> 
> ## normal function help
> ## ...
> 
> 2) If you put tests of the following form after your
> function they will be automatically run on install:
> 
> %!assert(expr, expected, tol)
> 
> See 'help test' for details.
> 
> 3) You will need to use the new package directory
> structure and metadata files.
> 
> 
> 4) texinfo is the usual format for documentation
> (and someday even I might start using it 8-)
> 
> 5) Your 'see also' help needs to be in the same
> comment block as the rest of the help.
> 
> 6) Are you sure the info-theory.m file needs to
> have copies of all your functions?  Also, it
> probably shouldn't have an extension since it
> is available on the octave command line.
> 
> 7) In mutualinformation, rather than:
> 
>    idx_rng = 1:cols
>    tVal = XY(i,idx_rng)./(X(idx_rng)*Y(i))
> 
> You can write:
> 
>    tVal = XY(i,:)./(X*Y(i))
> 
> Also, it seems to have one too many end statements.
> 
> 8) Rather than size(X)(2) you can write size(X,2)
> 
> 
> I haven't checked whether these functions duplicate
> existing matlab functions.
> 
> - Paul
> 
Paul,

While I work on directions you have suggested (Thanks!)
I did a preliminary web-search on existing matlab functions,
and cant seem to find anything like what we are looking at.

So might infact turn out to be useful, or atleast so I hope.

Also the info-theory.m is there just for the unoptimized version
of the functions, which dont need to be distributed, just for
reference implementations.

Thanks again,
-Muthu