Very Simple
2D Classification (neural network)
Classification - standard algorithms
Back-Propagation vs Cascade-Correlation
Time-sequence prediction
QSVD-ICA preprocessing

Real-life applications:
nt charge-current interactions selection (ICARUS experiment)
aLL estimation (COMPASS experiment)

Very Simple

Download example (2.18MB) - project and data files, this archive contains both "Very Simple" and "2D Classification" examples.

Short introduction:

There are two classes:
Red (let's say "signal") and Blue ("background"). Events of this classes have two features, so they can be presented in a scatter plot, like in the image below, where training set contents is shown. Network task is to separate these classes in the best possible way.

What is in the project:

Project in this case is extremely simplified. It consists of two
DataSet blocks that hold training and testing events and the Network block. Training events are presented above, testing events have the same distribution (but there is 100x more of them). Training set is an ASCII file - you can look at it and compare its structure with formatting string in the training_set DataSet block. Each line in this file represents one event. First two values are the features of the event, third value is desired network output for this event. Network have single output neuron and it is expected to give value of 0.05 for background (blue) events and value of 0.95 for signal (red) events. Network structure is fixed (two hidden layers with 14 and 4 units).

How to run this example:

Network block is already connected to the training_set DataSet block. Network training parameters are set up. You just have to push the Go button of the Network block, push there Go! button and wait... Save error info is turned on, so you can watch how the training error decreases (select menu Edit - Add Graph - Network Error, rigth click in the plot window to open a context menu, select Add Net Source to open dialog window, select Very Simple \ Network in the Available data objects list and push OK). If everything works well, plot looks more or less like in the following image:

When the training is done you can save the network to a file. Then you can run the network over the events from the testing_set DataSet block (connect this block to the network input first and then switch the Training Method to JustRun and push Go! button). To see the network answers and compare them with target values push Setup button on one of the DataSets and go to the Preview tab. More comfortable way of checking the network results is to make a scatter plot of events coloured with the network output. To create such a plot choose menu Edit - Add Graph - XY Data Points, rigth click in the plot window to open a context menu, select Add XY Data to open dialog window, select Very Simple \ testing_set in the Available data objects list, change ConstColor to TopoI and push OK (other options in this dialog window should remain with default values in this case). You should get something like this:

Another way to measure correctness of the training results is purity-efficiency plot. Purity is a fraction of the signal events in the set of events with the network answer above some threshold. Efficiency is a fraction of signal events with the network answer above the same threshold, but in the set of all signal events. The more signal events survive the selection the higher efficiency we get. The "cleaner" is the set of events that survived, the higher purity is obtained. We want to get both values possibly high. Mentioned threshold on the network answer is adjustable, so pairs purity-efficiency for different threshold values create a whole curve. We can compare the curves calculated for the training and testing sets - it is a very good test against the overtraining effect. If curves are far beyond the statistical errors, used training set is not representative for our signal / background distributions.
To create purity-efficiency plot choose menu
Edit - Add Graph - Signal Selection, rigth click in the plot window to open a context menu, select Add Data Source to open dialog window, select Very Simple \ testing_set in the Available data objects list, check Mark Errors and push OK button; add the purity-efficiency plot for Very Simple \ training_set in the same window (change the color of this curve before you click OK). Results usually looks like on the following image:

--top--   --up--

2D Classification

Download example (2.18MB) - project and data files, this archive contains both "Very Simple" and "2D Classification" examples.

Short introduction:

The network task and data sets are exactly the same as in the previous example. More program functionality is presented here: data flow, preprocessing and simple use of the triggering chains. Although the normalization is not crucial for data used in this example, it is applied here just to show how it works.

What is in the project:

Project contains
training_data and testing_data DataSets that read events from files. Transform blocks normalize events to zero-mean and unitary standard deviation in each position of the input vectors. Normalization calculations are started by prepare_data Trigger block. Normalized events (stored in the normalized_data and normalized_data(test) DataSets) are used to train the network. Dynamic network structure is used this time to allow the network to choose the best hidden neurons multiplicity. Each time the training process stops the network model (architecture, interconnection weights) are written to the 2d_classif.NetBin file. After each training/testing run events are separated (basing on the target value: t1=0.95 means signal, t1=0.05 means background) and sent to the output DataSets. Network is triggered by network_start block.

How to run this example:

All the connections between blocks and other setup is ready. Push
Go button on the prepare_data block to start the normalization Transform blocks. After calculations are done (all red lights turn back to green) You can look at the normalized_data and normalized_data(test) contents. Scatter plot for normalized events looks like on the image, but it is shifted and scaled. To create such a plot choose menu Edit - Add Graph - XY Data Points, rigth click in the plot window to open a context menu, select Add XY Data to open dialog window, select 2D Classification \ normalized_data in the Available data objects list, change ConstColor to Blue2Red, put "t1" in the Z Axis Data (color), change Strength to 2 and push OK. Result is as follows:

Push Go button on the network_start block to start the training process. Dynamic changes of the network structure are turned on, so expect that training will take more time. Also network error might be different and contain "spikes" that occurs when new neurons are tried. If error doesn't decrease to the previous (or lower) value almost immediately after "spike" probably low or twin parameter of the dynamic structure algorithm is too high (another reason might be too high initial step of the training algorithm). Usually error function should look like on the following image, where complete training progress is presented. There were 13 new neurons added and 6 removed, network started from a structure like in the project file attached to this example.

Next image presents enlargement of the error function, where small spikes mark attempts of the new neuron adding and one large spike occurs after neuron removing. Spikes of these sizes are normal (note, that on the image above only the largest spike is visible).

--top--   --up--