tsieger/mhca

Bad multiplication factor computation

Closed this issue · 1 comments

On line 1112 in mhclust.c there is:
mf=pow(mf,2/p);
I think that part 2/p is not really what you want as there will be only integer division. That means that in majority of cases you will get zero as p is usually bigger than 2.

Also, line 1142 seems to be suspicious as well. There is similar operation, but with a minus sign. Is the minus sign intentional?
icNmf=pow(icNmf,-2.0/p);

Thanks for the catch. The first case was indeed a bug.
The second case is OK: the negation serves its purpose, as (1/a)^p = a^(-p).