Coder Social home page Coder Social logo

Comments (14)

peterwittek avatar peterwittek commented on July 18, 2024

Could you give us a reference to this neighbourhood function? I am not familiar with it. Thanks.

from somoclu.

brogie62 avatar brogie62 commented on July 18, 2024

image
It is a simple cut-off or square function where all nodes within the radius are affected equally. It is the only neighborhood function in the Matlab Neural Network Toolbox and in the R package 'kohonen'. It is one of 2 choices (along with Gaussian) in the R package 'som'.

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

Commit 1e6988b implements choosing between bubble and Gaussian neighborhood functions across all interfaces (CLI, API, Python, R, MATLAB). Please test it. Once it works, I close this issue.

For future reference, the above extract is from this paper. The paper concludes that "[t]"he bubble neighboring function yields the worst result for all the data sets analyzed." Nevertheless, we have it now.

Please note that Somoclu does not have a compact support for the neighborhood function by default. This means that in Eq. (2), N_c contains all nodes. To recover the behavior in Eq. (2), request a compact support with the corresponding optional parameter.

Also note that the Gaussian neighborhood in Somoclu is slightly different from Eq. (3): the eta rank does not appear in the denumerator.

from somoclu.

brogie62 avatar brogie62 commented on July 18, 2024

Thanks Peter. I am aware of the conclusions from that paper. Parameter optimization studies conducted on my data sets gives the reverse.

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

This surely isn't the best paper ever written on self-organizing maps, so I am not surprised at your findings. Please give it a go with the new bubble neighborhood function and let me know if it works as expected.

from somoclu.

brogie62 avatar brogie62 commented on July 18, 2024

I am trying to install your updated R package but am getting an error:
'Error in getOctD(x, offset, len) : invalid octal digit'
I have never installed from source before so I am guessing I am doing something wrong.
I have previously been running from the CLI but thought R would be a faster test than re-compiling.

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

I tested the R version and I did not have any problems (GCC 5.2.2 and R 3.2.2, freshly installed Rcpp). @xgdgsc, do you have an insight on this?

from somoclu.

xgdgsc avatar xgdgsc commented on July 18, 2024

Might be file corruption ? How did you install the packege? What operating system/ which version of R do you use?

from somoclu.

brogie62 avatar brogie62 commented on July 18, 2024

Ubuntu 14.04
R 3.0.2
gcc 4.8.2

This is on an AWS instance. It may be that I am installing the wrong file or poor command syntax. I used R CMD INSTALL trying both the Rsomoclu.R and the Rsomoclu.cpp files and got the same error for both.

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

I just noticed there was an unrelated typo in the R version. Please use the latest git, I fixed the problem.

This is what I do:

git clone https://github.com/peterwittek/somoclu
cd somoclu
./autogen.sh
./configure
make r
R

Then from the R command line, I install Rcpp from CRAN and RScomoclu from source:

install.packages("Rcpp")
install.packages("./src/Rsomoclu_1.5.tar.gz", repos=NULL, type="source")

This works for me. Sorry for the trouble, I hope you get it working. Once we go through with this basic testing, we can do a minor release to make it available on CRAN.

from somoclu.

brogie62 avatar brogie62 commented on July 18, 2024

Compiled and tested Rsomoclu. Found that I got very different results using gaussian than I did from the CLI version of Somoclu. Decided to test prior version (1.5) of Rsomoclu. With the same parameters the outcome is very different between the two interfaces, R and CLI. The CLI results are more in line with experience using other som packages. Rsomoclu also outputs the BMUs as a list that is 2 x input rows, not 'x' and 'y' columns like CLI. Not sure if Rsomoclu is xxxxx... then yyyyy... or xyxyxyxy... The column is headed 'x'.

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

The main difference between the R version and all the other version is that the R wrapper uses R's random number generator for initializing the map. This might result in vastly different maps.

You are right, the encoding for BMUs is xyxy...

This is becoming unrelated to the original issue, so please open a new one if you see problems with the R wrapper. We do not really have R expertise, so it is quite limited what we can do, but opening an issue can never hurt.

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

Did you have a chance to test the bubble distance?

from somoclu.

peterwittek avatar peterwittek commented on July 18, 2024

Actually, the bubble distance only makes any sense with a compact support. I changed the code accordingly (commit 3a25793), and with that, I believe this issue is resolved.

from somoclu.

Related Issues (20)

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.