예제 #1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="outputActivationCfg">Configuration of the output layer activation function.</param>
 /// <param name="hiddenLayersCfg">The configuration of the hidden layers. Hidden layers are optional.</param>
 /// <param name="trainerCfg">The configuration of the associated trainer.</param>
 public FeedForwardNetworkSettings(IActivationSettings outputActivationCfg,
                                   HiddenLayersSettings hiddenLayersCfg,
                                   RCNetBaseSettings trainerCfg
                                   )
 {
     OutputActivationCfg = (IActivationSettings)outputActivationCfg.DeepClone();
     HiddenLayersCfg     = hiddenLayersCfg == null ? new HiddenLayersSettings() : (HiddenLayersSettings)hiddenLayersCfg.DeepClone();
     TrainerCfg          = trainerCfg.DeepClone();
     Check();
     return;
 }
예제 #2
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="outputActivationCfg">Output layer activation configuration</param>
 /// <param name="hiddenLayersCfg">Hidden layers configuration. Hidden layers are optional.</param>
 /// <param name="trainerCfg">Configuration of associated trainer</param>
 public FeedForwardNetworkSettings(RCNetBaseSettings outputActivationCfg,
                                   HiddenLayersSettings hiddenLayersCfg,
                                   RCNetBaseSettings trainerCfg
                                   )
 {
     OutputActivationCfg = ActivationFactory.DeepCloneActivationSettings(outputActivationCfg);
     OutputRange         = ActivationFactory.GetInfo(OutputActivationCfg, out _, out _);
     HiddenLayersCfg     = hiddenLayersCfg == null ? new HiddenLayersSettings() : (HiddenLayersSettings)hiddenLayersCfg.DeepClone();
     TrainerCfg          = trainerCfg.DeepClone();
     Check();
     return;
 }
예제 #3
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="name">The name of the generated field.</param>
 /// <param name="generatorCfg">The configuration of an associated generator.</param>
 /// <param name="routeToReadout">Specifies whether to route the generated field to the readout layer.</param>
 /// <param name="featureFilterCfg">The configuration of the real feature filter.</param>
 public GeneratedFieldSettings(string name,
                               RCNetBaseSettings generatorCfg,
                               bool routeToReadout = DefaultRouteToReadout,
                               RealFeatureFilterSettings featureFilterCfg = null
                               )
 {
     Name             = name;
     GeneratorCfg     = generatorCfg.DeepClone();
     RouteToReadout   = routeToReadout;
     FeatureFilterCfg = featureFilterCfg == null ? null : (RealFeatureFilterSettings)featureFilterCfg.DeepClone();
     Check();
     return;
 }
예제 #4
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="name">Transformed field name</param>
 /// <param name="transformerCfg">Configuration of associated transformer</param>
 /// <param name="routeToReadout">Specifies whether to route transformed field to readout layer together with other predictors</param>
 /// <param name="featureFilterCfg">Configuration of real feature filter</param>
 /// <param name="spikingCodingCfg">Configuration of spiking coding neurons</param>
 public TransformedFieldSettings(string name,
                                 RCNetBaseSettings transformerCfg,
                                 bool routeToReadout = DefaultRouteToReadout,
                                 RealFeatureFilterSettings featureFilterCfg = null,
                                 SpikeCodeSettings spikingCodingCfg         = null
                                 )
 {
     Name             = name;
     TransformerCfg   = transformerCfg.DeepClone();
     RouteToReadout   = routeToReadout;
     FeatureFilterCfg = featureFilterCfg == null ? null : (RealFeatureFilterSettings)featureFilterCfg.DeepClone();
     SpikingCodingCfg = spikingCodingCfg == null ? null : (SpikeCodeSettings)spikingCodingCfg.DeepClone();
     Check();
     return;
 }
예제 #5
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="name">Name of the neuron group</param>
 /// <param name="relShare">Specifies how big relative portion of pool's neurons is formed by this group of the neurons</param>
 /// <param name="activationCfg">Common activation function settings of the groupped neurons</param>
 /// <param name="homogenousExcitabilityCfg">Configuration of the neuron's homogenous excitability</param>
 /// <param name="biasCfg">Each neuron within the group receives constant input bias. Value of the neuron's bias is driven by this random settings</param>
 /// <param name="predictorsCfg">Configuration of the predictors</param>
 public SpikingNeuronGroupSettings(string name,
                                   double relShare,
                                   RCNetBaseSettings activationCfg,
                                   HomogenousExcitabilitySettings homogenousExcitabilityCfg = null,
                                   RandomValueSettings biasCfg      = null,
                                   PredictorsSettings predictorsCfg = null
                                   )
 {
     Name                      = name;
     RelShare                  = relShare;
     ActivationCfg             = activationCfg.DeepClone();
     HomogenousExcitabilityCfg = homogenousExcitabilityCfg == null ? new HomogenousExcitabilitySettings() : (HomogenousExcitabilitySettings)homogenousExcitabilityCfg.DeepClone();
     BiasCfg                   = biasCfg == null ? null : (RandomValueSettings)biasCfg.DeepClone();
     PredictorsCfg             = predictorsCfg == null ? null : (PredictorsSettings)predictorsCfg.DeepClone();
     Check();
     return;
 }
예제 #6
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="name">Name of the neuron group</param>
 /// <param name="relShare">Specifies how big relative portion of pool's neurons is formed by this group of the neurons</param>
 /// <param name="activationCfg">Common activation function settings of the groupped neurons</param>
 /// <param name="firingThreshold">
 /// A number between 0 and 1 (LT1). Every time the new normalized activation value is higher than the previous
 /// normalized activation value by at least the threshold, it is evaluated as a firing event.
 /// </param>
 /// <param name="thresholdMaxRefDeepness">Maximum deepness of historical normalized activation value to be compared with current normalized activation value when evaluating firing event.</param>
 /// <param name="biasCfg">Each neuron within the group receives constant input bias. Value of the neuron's bias is driven by this random settings</param>
 /// <param name="retainmentCfg">Neurons' retainment property configuration</param>
 /// <param name="predictorsCfg">Configuration of the predictors</param>
 public AnalogNeuronGroupSettings(string name,
                                  double relShare,
                                  RCNetBaseSettings activationCfg,
                                  double firingThreshold           = DefaultFiringThreshold,
                                  int thresholdMaxRefDeepness      = DefaultThresholdMaxRefDeepness,
                                  RandomValueSettings biasCfg      = null,
                                  RetainmentSettings retainmentCfg = null,
                                  PredictorsSettings predictorsCfg = null
                                  )
 {
     Name                    = name;
     RelShare                = relShare;
     ActivationCfg           = activationCfg.DeepClone();
     FiringThreshold         = firingThreshold;
     ThresholdMaxRefDeepness = thresholdMaxRefDeepness;
     BiasCfg                 = biasCfg == null ? null : (RandomValueSettings)biasCfg.DeepClone();
     RetainmentCfg           = retainmentCfg == null ? null : (RetainmentSettings)retainmentCfg.DeepClone();
     PredictorsCfg           = predictorsCfg == null ? null : (PredictorsSettings)predictorsCfg.DeepClone();
     Check();
     return;
 }