Using a system trained in Synapse
One commonly asked question is how to best use a trained system with new data. There are three basic approaches:
- Using the probe post-processing component .
- Deploying the system (covered in detail by tutorial #2)
- Loading the new data into Synapse
-
As the first two ways are covered by existing tutorials, this post will cover 3) - how you load and and use new data within a solution in Synapse.
Example solution
Here is an example solution containing a trained system: abalone_test.zip
Extract all files into the same directory and open abalone.synx in Synapse. We will now prep the system for testing. If these steps seem elaborate, don't worry - you only have to do them once.
Step 1: Fix scaling
Most adaptive system require the data to be scaled within a normal interval (typically -1 and 1). The data source blocks do this automatically by detecting the minimum and maximum values. We want this when we train the system but not when we test it - then we want the scaling determined during training to be unchanging. We can make sure that this is the case by setting the data source scaling to "fixed". Select both data sources:
In the property browser, change under "Scale/Normalize", "Mode" to "Fixed":
Step 2: Turn off learning
Since we don't want the system to continue training, we need to turn learning off. Also we will be loading the new data into the validation channel so we want to set the control system to only use validation data. Go to "Training" and in the control system GUI uncheck the "Learning On" and select "Validation" from the drop down list:
Step 3: Load the new data
Go to preprocessing and double click on the existing data unit:
Select the file called "abalone_test.txt". In the final screen of the wizard, set data validation percentage" to 100%:
The test data has exactly the same form as the training data. The target feature that we are trying to predict (Age) is included as well, but contains just zeros. It is very important to keep the test data file(s) on exactly the same form as the training data.
That's it. You can now go to training and run the system for an epoch to push through the test data:
If you wish you can see the full system output using the Error Analyzer:
As you can see the "Desired" - i.e target feature is zero as no target data was provided in the test file.
Tip: You can right-click on the confidence plot and select "Copy Data to Clipboard" to quickly get the information in text format.
Step 4: (Optional) Add a sink to save test output
You may want to add a sink block to the system in order to save the system output to a text file, SQL database or simply into a new data unit in Synapse. Here is a quick overview of the sink component and how you can configure it to save the system output to a text file. You only need to configure it once and can later use it whenever you want with no or minimal actions on your side.
First, add a sink block and connect it to the output of the system:
Go to the properties browser - there are a couple of things there to configure:
- Path & File Name determine the output location of the file.
- Automatic sets if the file should be written every time the data changes (i.e. every epoch) or only when you click "Write Now". Automatic writing can slow down the system and is by default turned off.
- Set both "Set" and "Target Set" to "Validation". This determines which channel the sink should listen to and write to. As we've put all our test data into the validation channel they should be set to "Validation".
- "Use" determines if the sink should try to restore the original scaling of the data.
- "Supplier" is the supplier of the scaling information. This is typically the data source containing the target data - in our case "Data Source 2". There may be multiple entries for the same data source as this information is occasionally rebuilt. Pick the last one in the list (that has the name of the data source block containing the target data).
When you are done, run the system ("Step epoch"), go to the sink settings and press "Write Now". The file will be created in the location that you've specified.










