kohonen | A basic implementation of a Kohonen map in JavaScript | Artificial Intelligence library

 by   seracio TypeScript Version: 0.7.0 License: MIT

kandi X-RAY | kohonen Summary

kandi X-RAY | kohonen Summary

kohonen is a TypeScript library typically used in Artificial Intelligence applications. kohonen has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A basic implementation of a Kohonen map in JavaScript. Disclaimer: this is a toy implementation of the SOM algorithm, you should probably consider using a more solid library in R or Python.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              kohonen has a low active ecosystem.
              It has 12 star(s) with 4 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 26 have been closed. On average issues are closed in 7 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of kohonen is 0.7.0

            kandi-Quality Quality

              kohonen has 0 bugs and 0 code smells.

            kandi-Security Security

              kohonen has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              kohonen code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              kohonen is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              kohonen releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kohonen
            Get all kandi verified functions for this library.

            kohonen Key Features

            No Key Features are available at this moment for kohonen.

            kohonen Examples and Code Snippets

            No Code Snippets are available at this moment for kohonen.

            Community Discussions

            QUESTION

            Not able to refer back to genes clustered in som analysis using R's kohonen package
            Asked 2022-Jan-06 at 21:34

            I am stuck in a problem, I am trying to apply SOM analysis using the kohonen package in R. The dataset I am using is a gene expression dataframe. I am using the code given below,

            ...

            ANSWER

            Answered 2022-Jan-06 at 21:34

            Using data(wines) as an example.

            som.wines <- som(scale(wines), grid = somgrid(5, 5, "hexagonal"))

            Each big circle in your plot is a cluster of samples found in the data by rows. The profiles of the clusters are stored in som.wines$codes. Each line here is a cluster, V1 - Vx. This corresponds, obviously, to the number of big circles. You find the associated rows, i.e. the original data, in som.wines$unit.classif.

            Associate the clusters with your original data with

            Source https://stackoverflow.com/questions/70610528

            QUESTION

            How to solve error: "Error in storage.mode(x) <- "double" : 'list' object cannot be coerced to type 'double'" and get results
            Asked 2021-Dec-11 at 13:58

            I'm trying to run some and k means analysis. But I can't solve it because there's an error code.

            Error in storage.mode(x) <- "double" : 'list' object cannot be coerced to type 'double'

            ...

            ANSWER

            Answered 2021-Dec-11 at 13:37

            You should coerce the object to a matrix or a data frame. From the kmeans() documentation:

            x = numeric matrix of data, or an object that can be coerced to such a matrix (such as a numeric vector or a data frame with all numeric columns)

            Source https://stackoverflow.com/questions/70314096

            QUESTION

            Tableau: Self-Organizing Map visualization
            Asked 2021-Nov-12 at 17:57

            So, it's my first time trying to make my own data visualization, and what I want to do is something like a heat map or highlighted table like the original Kohonen (but using squares rather than hexagons) research about countries, but I don't know how to apply it to the map I've got from training the network.

            I've read a few links about making a highlighted table and heat map on Tableau, but what I get is always just a table mainly because I'm not using a measure (i just want every country of one color), so, my question is: is it possible to use Tableau for this situation and if so, how could I do it? Thanks!

            Original SOM visualization from Dr. Kohonen

            Table from Tableau

            ...

            ANSWER

            Answered 2021-Nov-12 at 17:57

            Yes it is possible to make visualizations like you describe in Tableau - but the question you posed is a bit vaguely specified to give you much more detailed guidance than first take some Tableau training.

            For instance, how do you want to determine which row and column to place a country? You may need to write a table calc for row and col positions, which means learning about table calcs. Or you can assign them in a data column.

            For square country marks, you'll want a discrete field on the rows shelf, a discrete field on the columns shelf, possible a dimension like Country name on the details shelf. Choose a square mark type, and (important) choose a square cell size from the format menu. Then adjust the size of your squares from the size button and the format menu, and colors and borders from the color button and format pane.

            Lots to play with.

            Source https://stackoverflow.com/questions/69939245

            QUESTION

            Coloring clusters
            Asked 2021-Mar-05 at 08:32

            I am using the following code which performs the SOM (Self Organizing Map, also called the Kohonen Network) machine learning algorithm to visualize some data. Then, I use a clustering algorithm (I select 8 clusters) on the visualization:

            ...

            ANSWER

            Answered 2021-Mar-05 at 00:23

            Replace somClusters with clusters in the definition of the background color in the last plot. The main issue is that you defined somClusters to have three values, not 8. If you use that to index the vector of colors, it will only have three colors.

            Source https://stackoverflow.com/questions/66484859

            QUESTION

            Identifying points by color
            Asked 2021-Feb-02 at 01:03

            I am following the tutorial over here : https://www.rpubs.com/loveb/som . This tutorial shows how to use the Kohonen Network (also called SOM, a type of machine learning algorithm) on the iris data.

            I ran this code from the tutorial:

            ...

            ANSWER

            Answered 2021-Jan-26 at 17:11

            From what I can see, using iris.som$unit.classif & iris.som$grid is the way to go in isolating circles within the plotting grid. I have made an assumption that the classifier value matches the row index of iris.som$grid so this will need some more validation. Let me know if this helps your problem :)

            Source https://stackoverflow.com/questions/65864333

            QUESTION

            R: arranging multiple plots together using gridExtra
            Asked 2021-Jan-21 at 18:20

            I am using the R programming language. I am trying to arrange "plot1, plot2, plot3, plot4" on the same page:

            ...

            ANSWER

            Answered 2021-Jan-21 at 18:15

            It looks like you are dealing with the base plot system in R, and assigning the plots to variables does not generate anything (e.g. plot1 is NULL). You can use layout to split the graphics area into subsections and then plot the individual plots into those:

            Source https://stackoverflow.com/questions/65832784

            QUESTION

            Save non-SparkDataFrame from Azure Databricks to local computer as .RData
            Asked 2021-Jan-21 at 11:21

            In Databricks (SparkR), I run the batch algorithm of the self-organizing map in parallel from the kohonen package as it gives me considerable reductions in computation time as opposed to my local machine. However, after fitting the model I would like to download/export the trained model (a list) to my local machine to continue working with the results (create plots etc.) in a way that is not available in Databricks. I know how to save & download a SparkDataFrame to csv:

            ...

            ANSWER

            Answered 2021-Jan-21 at 00:21

            If all your models can fit into the driver's memory, you can use spark.lapply. It is a distributed version of base lapply which requires a function and a list. Spark will apply the function to each element of the list (like a map) and collect the returned objects.

            Here is an example of fitting kohonen models, one for each iris species:

            Source https://stackoverflow.com/questions/65596202

            QUESTION

            Plot causes "Error: Incorrect Number of Dimensions"
            Asked 2021-Jan-20 at 02:15

            I am learning about the "kohonen" package in R for the purpose of making Self Organizing Maps (SOM, also called Kohonen Networks - a type of Machine Learning algorithm). I am following this R language tutorial over here: https://www.rpubs.com/loveb/som

            I tried to create my own data (this time with both "factor" and "numeric" variables) and run the SOM algorithm (this time using the "supersom()" function instead):

            ...

            ANSWER

            Answered 2021-Jan-20 at 02:15

            getCodes() produces a list and as such you have to treat it like one.

            Calling getCodes(som) produces a list containing 7 items named a-g as such you should be selecting items from the list either using $ or [[]]

            e.g

            Source https://stackoverflow.com/questions/65781259

            QUESTION

            Error: Mean Distance Between Objects Zero
            Asked 2021-Jan-18 at 01:35

            I am trying to learn about the "kohonen" package in R. In particular, there is a function called "supersom()" (https://www.rdocumentation.org/packages/kohonen/versions/3.0.10/topics/supersom , corresponding to the SOM (Self Organizing Maps) algorithm used in unsupervised machine learning) that I am trying to apply on some data.

            Below, (from a previous question: R error: "Error in check.data : Argument Should be Numeric") I learned how to apply the "supersom()" function on some artificially created data with both "factor" and "numeric" variables.

            ...

            ANSWER

            Answered 2021-Jan-18 at 01:35

            The error happens if you have certain numeric columns whose mean is 0. You can reproduce the error by turning any 1 column to 0.

            Source https://stackoverflow.com/questions/65763760

            QUESTION

            R error: "Error in check.data : Argument Should be Numeric"
            Asked 2021-Jan-17 at 06:01

            I am learning about the "kohonen" library for the R programming language. I created some artificial data to try some of the functions on. I tried using the "supersom()" function on only continuous (i.e type = as.numeric) data and everything works well. However, when I tried to run the "supersom()" function on both continuous and categorical (type = as.factor), I start to run into some errors ("Argument data should be numeric").

            The "supersom()" function has an argument called "dist.fct" (distance function) which allows the user to specify which type of "distance" (e.g. "Euclidean" for continuous, "tanimoto" for categorical) should be used for different columns. I created a data set with 4 continuous variables and 3 categorical variables. Using the following link : https://www.rdocumentation.org/packages/kohonen/versions/2.0.5/topics/supersom , I tried to run the example:

            ...

            ANSWER

            Answered 2021-Jan-17 at 06:01

            If you keep factor or character data in a matrix it will turn all other values of matrix to character since a matrix can have data of only one type. Keep only numeric data in the matrix or convert each column to a list.

            Source https://stackoverflow.com/questions/65757562

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install kohonen

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i kohonen

          • CLONE
          • HTTPS

            https://github.com/seracio/kohonen.git

          • CLI

            gh repo clone seracio/kohonen

          • sshUrl

            git@github.com:seracio/kohonen.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Artificial Intelligence Libraries

            Try Top Libraries by seracio

            au-rapport

            by seracioJupyter Notebook

            xstream-connect

            by seracioJavaScript

            zscore

            by seracioJavaScript

            kohonen-stars

            by seracioJavaScript

            annotation

            by seracioTypeScript