Getting started with Neural Designer
By Roberto Lopez, Artelnics.
Neural Designer is a software for discovering complex relationships, recognizing unknown patterns, predicting actual trends or finding associations from data sets by means of neural networks, a main paradigm of artificial intelligence. The fields of application of neural networks are countless, but Neural Designer is specialized in science/engineering, bussines intelligence and health care.
Neural Designer is a software for modelling of data available for Windows, Mac and Unix. It allows you to solve predictive analytics and data mining applications by means of a machine learning technique called neural networks. Machine learning is field of artificial intelligence that attempts to model high-level abstractions in data by using architectures composed of multiple non-linear transformations. Neural Designer has been produced for several computing platforms, including Windows, Mac and Linux.
The input to Neural Designer is a data set, and the output from it is a neural model. That neural model takes the form of a mathematical expression and can be exported to any computer language or system. The next figure shows the activity diagram of Neural Designer.
The engine inside Neural Designer has been made using the popular neural networks library OpenNN. OpenNN counts with thousand of users and contributors worldwide, and it has been successfully applied to innumerable research projects in fields such as engineering, business, health or smart cities.
On the other hand, Neural Designer has been created to meet the user requirements, considering the reliability and the ability of the software to perform the required functions easily and efficiently in different environments. The product highlights functionality, performance and usability.
Neural networks is considered to be the best choice for predictive analytics and data mining. Neural Designer provides a comprehensive neural networks package plenty of innovations. All that allows data scientists to obtain results in a way previously unachievable.
Neural Designer has been developed using the C++ programming language, which outstands in terms of execution speed and memory allocation (as opposite to Java or R). The software has been subject to optimization strategies and techniques to maximize the efficiency. Moreover, it also implements multi-core processing, which multiplies the execution speed by a factor of 4 in most computers.
As a result, we are proud to offer one of the fastest predicitive analytics platforms in the market. The next figure summarizes a memory and speed comparison between a popular data mining software written in Java and Neural Designer, using different benchmark data sets on the same computer. As we can see, Neural Designer can deal with data sets 40 times bigger and is 10 times faster than the other. We continue working to further improve that numbers.
Finally, Neural Designer provides an interface which is aesthetic, consistent and communicative. There is neither need for programming scripts nor for building complicated block diagrams. The software comes with many tutorials worked examples.
Neural Designer has two main windows, plus a calculation engine running in background. These allow you to (1) edit your settings, (2) perform neural network computations, and (3) see your output. Each component has input and output files associated. The next figure illustrates the flow of information in Neural Designer. The input here can be taken from a data set, which can have different formats (CSV, XLS, etc.) or from a database, which can be My SQL, Oracle, Microsoft SQL Server, etc. The output of Neural Designer is the predictive model.
As we can see, Neural Designer has three main components:
- Neural Editor.
- Neural Engine.
- Neural Viewer.
The Neural Editor lets you see and manipulate your neural network settings. To run Neural Editor, click Start, Programs, Neural Designer, and then Neural Editor. The following figure shows the start page of Neural Editor.
Opening, for instance, the iris flowers example, shows the main components of Neural Editor.
As we can see, Neural Editor has three panes:
- A data book with data set, neural network, loss index, training strategy and model selection tabs. It contains the settings for all the components needed to solve a given application. Default values for all the settings are provided by the software when specifying the data file to work with.
- A task manager with data set, neural network, loss index, training strategy, model selection, testing analysis and model deployment tasks. It contains a list of task for each component to be run by the engine. Some tasks need additional information which is required to the user via dialogues.
- An output pad for the editor, the engine and the viewer. Most information, warning and error messages will appear here.
The input to Neural Editor is a data file that can be taken from a file (csv, txt, dat, etc) or from a database (MYSQL, SQL Lite, Oracle, etc). It can be of any type, but it must contain numeric or nominal variables arranged in rows and columns. The columns might be separated by spaces, tabs, commas or semicolons. A header with the names of the columns is also allowed. Moreover, the data file can have missing values denoted by some label.
Project files have a file type of .ndp (from Neural Designer project). Typically you start your Neural Editor session by opening the project file that you need to work with (.ndp file). When you open a project file, what you see is a working copy of your project. Changes you make to your settings are not permanent until you save them (click File, Save or Save As). Neural Editor lets you have only one project open. To open a different project, click File, Open Project. When you close your last Neural Editor you are shutting down Neural Designer and you will be prompted to save all unsaved files.
Neural Engine allows you run tasks. That application does not have any window, but it runs processes in background. Tasks are called from the task manager in the editor. As you ask Neural Engine to carry out various tasks, the results can show up in a variety of places. New settings will show up in Neural Editor. Tasks results will show up in Neural Viewer.
If some settings are inconsistent, then the output viewer in Neural Editor writes an error message and the task is not executed. If during execution, a task throws some error, it will be also written in the output viewer.
The input files to the engine are the project file (.ndp) and the tasks file (.ndt). The project file contains the settings in the data book, and the task file contains the clicked element in the task manager. The output file from the engine is of type .ndo, and will contain the results from all the tasks which have been run within a project. Nevertheless, the manipulation of input and output files by the engine is invisible to the user.
Neural Viewer shows you texts, tables and graphs you create by running tasks. To run the viewer, click Start, Programs, Neural Designer, and then Neural Viewer. It is started automatically when running any task from Neural Editor. Running, for example, the "Report data set task" from the editor, opens Neural Viewer and loads the corresponding results.
As you can see from the figure above, the viewer has two main panes:
- A tree view with the index of the report. Here every section corresponds to a task run by the engine (but the project description, which can be edited in the editor). Each subsection corresponds to a single description, table, chart, etc.
- A contents pane, which collects your descriptions, tables, graphs, etc.
You can also start Neural Viewer by opening the output file that you need to work with (.ndo file). As with Neural Editor, Neural Viewer only opens one output file.
Neural Viewer also allows you to export your results to a pdf file, or print them. To export your output, you go through a special procedure. In the Output Viewer click File, Export to invoke the Export dialog. When you export or print your output, it is the contents pane that is exported or printed. Also you can export any table and graph as png or csv by right clicking on it.
In this section we will follow the basic steps to solve an approximation application. If you follow this instructions, you need to create a file "data.dat" with the following contents:
That data set will have 2 variables and 11 instances. The first column represents the independent variable, x. The second column represents the dependent variable, y, and it is just the square of x. Therefore, our neural model will represent a parabola.
Open Neural Editor
Run the editor. Click Start, Programs, Neural Designer, and then Neural Editor. When the editor is opened you are presented with a start page giving you several options.
Create a new project
Clicking on "New project" will invoke the corresponding dialog. It is very important to select the appropriate project type for our application, approximation or classification. In this case we are solving an approximation problem. On the other hand we need to specify the name and location of our project. Here we will use the default values.
The project has been created. Neural Editor shows up the data book and the task manager.
Here we have the following components:
- Data set.
- Neural network.
- Loss index.
- Training strategy.
- Model selection.
- Testing analysis.
- Model deployment.
In the data set page you select the data file you are working with. Click on the "Browse data file" button. A file chooser dialog will appear. Select the file "data.dat" The data file is loaded and some default values are set. The next figure shows the data set page after loading the data file.
Once the data set has been selected, we need to define the use of the variables (input, target or unused). For this problem the first variable is an input (independent variable) and the second variable is a target (dependent variable).
Then we define the use of the instances (training, generalization, testing or unused). For this problem we will set all instances to be used for training.
In the neural network page the information about the neural network is set. The next figure shows this page.
The most important setting here is the neural network architecture. By default, the number of perceptrons in the hidden layer is 3. We can leave that default value.
In the loss index page the information about the performance measure is set. The next figure shows this page.
By default, the objective term is the normalized squared error, and regularization is not used.
In the training strategy page the information about the training strategy is set. The next figure shows this page.
By default, the initialization algorithm is random search, and the main algorithm is the quasi-Newton method.
The most important task is the so called "Perform training", which appears in the list of training strategy tasks from the task manager. Running that tasks the training algorithm minimizes the loss index, i.e., makes the neural network to fit the data set. The following figure shows the results from the perform training task in Neural Viewer.
Neural Designer provides innovative algorithms to automate the model selection process. Model selection is applied to find the topology of a neural network that minimizes the error on new data. There are two ways to obtain an optimal topology, order selection and inputs selection. Order selection algorithms are used to get the optimal number of neurons in the neural network. Inputs selection algorithms are responsible for finding the optimal subset of inputs.
When the neural network is designed and trained, Neural Designer offers diverse tasks to test the result offered by the model. For instance, the task "calculate confusion" depicts a table containing the data of a confusion matrix. Each column of the matrix represents the instances in a predicted class while each row represents the instances in an actual class.
Once the model has been tested, it is ready to make predictions. Model deployment tasks allow you to calculate directly outputs, calculate output data in a file, plot directional output, calculate jacobian, write the expression of the predictive model or export the expression for Python and R.