Code Monkey home page Code Monkey logo

mhca's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mhca's Issues

Apriori clusters check in normalization condition

Hi,
on line 1212 in mhclust.c, there is a condition that checks that not all clusters are of a Mahalanobis threshold size so the clusters can be normalized.

My question is:
Should there be a condition that checks that all samples in the apriori clusters have been clustered as well?

My reasoning behind this is that it can happen that all clusters reached Maha threshold before apriori clusters were fully clustered. And maybe? we want to normalize clusters even if we still have apriori samples?

Error when installing on Mac

Hi, because of a recommendation I wanted to try this package and its algorithm, but unfortunately the installation failed.

Can you help or imagine what the problem may be? Thanks, Chris.

This is the error message:

** using staged installation
** libs
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c mhca-init.c -o mhca-init.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c mhclust.c -o mhclust.o
mhclust.c:1086:120: warning: '&&' within '||' [-Wlogical-op-parentheses]
(subthreshHandlingId==SUBTHRESHOLD_METHOD_EUCLID || subthreshHandlingId==SUBTHRESHOLD_METHOD_EUCLID_MAHAL) && wf1==1) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
mhclust.c:1086:120: note: place parentheses around the '&&' expression to silence this warning
(subthreshHandlingId==SUBTHRESHOLD_METHOD_EUCLID || subthreshHandlingId==SUBTHRESHOLD_METHOD_EUCLID_MAHAL) && wf1==1) {
^
( )
1 warning generated.
clang -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o mhca.so mhca-init.o mhclust.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mhca.so] Error 1
ERROR: compilation failed for package ‘mhca’
─ removing ‘/private/var/folders/hd/gcy53z2x6sxd77_f8wl01by81nxlrm/T/RtmpEzmZAL/Rinst14a32da1f4d2/mhca’

Error using singleton apriori cluster(s)

Error in %*%: requires numeric/complex matrix/vector arguments
rises when one or more apriori cluster consists of only a single observation, e.g. when calling:
mhclust(data.frame(a=c(1,2,3), b=c(2,3,4)), g=c(1,3,3))

Bad multiplication factor computation

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);

singular covariance matrix gets not replaced with identity matrix in R impl

When covXij is singular (e.g. [0 0; 0 1]), det(covXij) is 0 and mf<-det(covXij)^(1/spaceDim) gets set to 0, which is unwanted (should be set to 1 in this case). This is because the fixed version of covXij computed by covXij<-wf1 * covXij + (1-wf1) * mf * fakeInvCov should be set to fakeInvCov (the identity matrix), not covXij.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.