Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Data handling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
okozelsk committed Jan 6, 2019
1 parent e90934e commit ec27d66
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 1 deletion.
170 changes: 170 additions & 0 deletions Demo/DemoConsoleApp/DemoSettings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<demo dataFolder=".\\Data">
<!--
This demo case demonstrates a richer form of reservoir setup. Reservoir consists of one small pool of SimpleIF spiking neurons
and one pool of Sigmoid analog neurons. Pools overlap within the reservoir (share the same 3D space) and pools are bidirectionally
interconnected. One additional internal input field "aug_input" (following random signal) is used.
Standard linear regression is used as a classifier on readout layer.
The dataset is from https://archive.ics.uci.edu/ml/datasets/Libras+Movement and contains 15 classes of 24 instances each, where
each class references to a hand movement type in LIBRAS. The hand movement is represented as a bidimensional curve performed
by the hand in a period of time. The curves were obtained from videos of hand movements, with the Libras performance from 4
different people, during 2 sessions. Each video corresponds to only one hand movement and has about 7 seconds.
Each video corresponds to a function F in a functions space which is the continual version of the input dataset.
In the video pre-processing, a time normalization is carried out selecting 45 frames from each video, in according
to an uniform distribution. In each frame, the centroid pixels of the segmented objects (the hand) are found, which
compose the discrete version of the curve F with 45 points. All curves are normalized in the unitary space.
Each curve F is mapped in a representation with 90 features, with representing the coordinates of movement.
Each instance represents 45 points on a bi-dimensional space, which can be plotted in an ordered way (from 1 through
45 as the X co-ordinate) in order to draw the path of the movement.
-->
<case name="Classification task Libras Movement: Mixed spiking and analog reservoir, Linear regression classifier">
<samples fileName="LibrasMovement.csv" normalizerReserve="0.1"/>
<stateMachineCfg randomizerSeek="0">
<input>
<feedingPatterned/>
<external>
<field name="coord_abcissa"/>
<field name="coord_ordinate"/>
</external>
<internal>
<field name="aug_input">
<randomGenerator min="-1" max="1"/>
</field>
</internal>
</input>
<reservoirCfgContainer>
<reservoirCfg name="MainCfg" synapticDelayMethod="Random" maxInputDelay="0" maxInternalDelay="1" spectralRadius="0.999">
<pools>
<pool name="Logistic pool" x="0" y="0" z="0" dimX="5" dimY="5" dimZ="5" readoutNeuronsDensity="1">
<neuronGroups>
<neuronGroup name="Exc-Logistic" role="Excitatory" relShare="4" augmentedStates="true">
<activationTanH/>
<bias min="-1" max="1" randomSign="false" distribution="Uniform"/>
</neuronGroup>
<neuronGroup name="Inh-Logistic" role="Inhibitory" relShare="1" augmentedStates="true">
<activationTanH/>
<bias min="-1" max="1" randomSign="false" distribution="Uniform"/>
</neuronGroup>
</neuronGroups>
<interconnection density="0.1" relShareEE="0.3" relShareEI="0.2" relShareIE="0.4" relShareII="0.1" avgDistance="NA" allowSelfConnection="true" constantNumOfConnections="false">
<dynamicSynapse restingEfficacy="0.5" tauFacilitation="500" tauRecovery="5" tauDecay="10">
<weight min="-1" max="1" randomSign="false" distribution="Uniform"/>
</dynamicSynapse>
</interconnection>
</pool>
</pools>
</reservoirCfg>
</reservoirCfgContainer>
<reservoirInstanceContainer>
<reservoirInstance name="Main" cfg="MainCfg" augmentedStates="true">
<inputFieldAssignments>
<inputFieldAssignment inputFieldName="coord_abcissa" poolName="Logistic pool" density="1">
<staticSynapse>
<weight min="0" max="1" randomSign="false" distribution="Uniform"/>
</staticSynapse>
</inputFieldAssignment>
<inputFieldAssignment inputFieldName="coord_ordinate" poolName="Logistic pool" density="1">
<staticSynapse>
<weight min="0" max="1" randomSign="false" distribution="Uniform"/>
</staticSynapse>
</inputFieldAssignment>
<inputFieldAssignment inputFieldName="aug_input" poolName="Logistic pool" density="1">
<staticSynapse>
<weight min="0.25" max="0.25" randomSign="false" distribution="Uniform"/>
</staticSynapse>
</inputFieldAssignment>
</inputFieldAssignments>
</reservoirInstance>
</reservoirInstanceContainer>
<readoutLayer testDataRatio="0.0825" folds="Auto">
<readoutUnit name="curved swing" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
</ff>
</readoutUnit>
<readoutUnit name="horizontal swing" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="vertical swing" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="anti-clockwise arc" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="clockwise arc" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="circle" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="horizontal straight-line" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="vertical straight-line" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="horizontal zigzag" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="vertical zigzag" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="horizontal wavy" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="vertical wavy" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="face-up curve" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="face-down curve" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
<readoutUnit name="tremble" task="Classification" attempts="10" attemptEpochs="100">
<ff regressionMethod="Linear">
<activationIdentity/>
<linRegrTrainer hiNoiseIntensity="0.1"/>
</ff>
</readoutUnit>
</readoutLayer>
</stateMachineCfg>
</case>

<!--
This demo case demonstrates a richer form of reservoir setup. Reservoir consists of one small pool of SimpleIF spiking neurons
and one pool of Sigmoid analog neurons. Pools overlap within the reservoir (share the same 3D space) and pools are bidirectionally
Expand Down
2 changes: 1 addition & 1 deletion RCNet/Neural/Data/PatternBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ out BundleNormalizer bundleNormalizer
//Remove the #Outputs keyword from the collection
outputNames.RemoveAt(0);
//Check if the there is at least one output name
if (outputNames.NumOfStringValues < 2)
if (outputNames.NumOfStringValues < 1)
{
throw new FormatException("Missing output name(es).");
}
Expand Down

0 comments on commit ec27d66

Please sign in to comment.