octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #43959] statistics package: kmeans incompatibi


From: Jordi Gutiérrez Hermoso
Subject: [Octave-bug-tracker] [bug #43959] statistics package: kmeans incompatibility with Matlab
Date: Fri, 09 Jan 2015 14:51:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Iceweasel/33.1

Follow-up Comment #3, bug #43959 (project octave):

Why is kmeans_replicates a whole new file?

Please follow Octave style:

* I see stray tabs. No tabs, please Use spaces for indentation.
* Spaces for "function_calls ()" but not for "indexing()".
* Use "!" for negation, not "~".
* Call "rows ()" or "columns ()", not "size (_, 1)" or "size (_, 2)".
* Use NA instead of NaN for missing values.

For bonus points, create a Mercurial cset and follow our commit message
guidelines: 

    http://wiki.octave.org/Commit_message_guidelines

As to the actual code itself, for the NaN patch...

* There is no need for the find() call when defining has_no_NaN. Remove it.
* I would rename "has_no_NaN", which sounds like a scalar, to "data_idx", to
emphasise that this is a logical index that only includes where the data is
actually complete.
* Move the definition of final_classes to the very end, since that is where
it's used.

The sums patch seems fine, modulo Octave style. I am too lazy to try to
untangle the replicates patch, please fix that first.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43959>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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