Skip to content

1 | Getting Started

Bruno Silva edited this page May 11, 2023 · 3 revisions

Contents

  1. Getting binaries
  2. Hello World
  3. Cloning the repository

Getting binaries

Binaries and dependency information for Maven, Gradle and others can be found at http://search.maven.org.

Example for Maven:

<dependency>
    <groupId>com.brunomnsilva</groupId>
    <artifactId>neuralnetworks</artifactId>
    <version>x.y.z</version>
</dependency>

You need Java 9 or later.

Hello World

The simplest use of Ubiquitous Neural Networks is to instantiate a neural network model and to simply visualize it:

public static void main(String[] args) {

    SelfOrganizingMap som = new BasicSOM(10, 20, 3);

    ComponentPlaneVisualizationPanel cpViz = SelfOrganizingMapVisualizationFactory.createComponentPlane(som, 0, "v1");

    GenericWindow window = GenericWindow.horizontalLayout("Component Plane", new ExportSVGWrapperPanel(cpViz));
    window.exitOnClose();
    window.setVisible(true);

}

In this example a new self-organizing map is instantiated and the first component of its prototypes is visualized. We also wrap this visualization in a ExportSVGWrapperPanel, so we can export the resulting visualization. The resulting visualization looks something like this:

HelloWorld

💡 the results will vary between executions, given the random initialization of prototypes.

Cloning the repository

The repository includes two main modules: the neuralnetworks module (the library) and the neuralnetworks-examples modules, which contains the usage examples provided in this Wiki (among others).

The repository can be cloned through any IDE that supports Git, or manually:

$ git clone https://github.com/brunomnsilva/UbiquitousNeuralNetworks.git
$ cd UbiquitousNeuralNetworks/

🥇 My personal IDE of choice for Java is IntelliJ IDEA from JetBrains.

From here you are welcome to tinker with the examples, create others and even contribute to this project! 😄

Clone this wiki locally