//Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="name">The 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">The common configuration of the neurons' activation function.</param>
 /// <param name="predictorsCfg">The common configuration of the predictors provider.</param>
 /// <param name="homogenousExcitabilityCfg">The configuration of the neurons homogenous excitability.</param>
 /// <param name="biasCfg">The configuration of the constant input bias.</param>
 public SpikingNeuronGroupSettings(string name,
                                   double relShare,
                                   IActivationSettings activationCfg,
                                   PredictorsProviderSettings predictorsCfg,
                                   HomogenousExcitabilitySettings homogenousExcitabilityCfg = null,
                                   RandomValueSettings biasCfg = null
                                   )
 {
     Name                      = name;
     RelShare                  = relShare;
     ActivationCfg             = (IActivationSettings)activationCfg.DeepClone();
     PredictorsCfg             = (PredictorsProviderSettings)predictorsCfg.DeepClone();
     HomogenousExcitabilityCfg = homogenousExcitabilityCfg == null ? new HomogenousExcitabilitySettings() : (HomogenousExcitabilitySettings)homogenousExcitabilityCfg.DeepClone();
     BiasCfg                   = biasCfg == null ? null : (RandomValueSettings)biasCfg.DeepClone();
     Check();
     return;
 }
示例#2
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="name">The 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">The common configuration of the neurons' activation function.</param>
 /// <param name="predictorsCfg">The common configuration of the predictors provider.</param>
 /// <param name="firingThreshold">The firing threshold value. Every time the current normalized activation is higher than the normalized past reference activation by at least this threshold, it is evaluated as a firing event.</param>
 /// <param name="thresholdMaxRefDeepness">Maximum age of the past activation for the evaluation of the firing event.</param>
 /// <param name="biasCfg">The configuration of the constant input bias.</param>
 /// <param name="retainmentCfg">The configuration of the neurons' retainment property.</param>
 public AnalogNeuronGroupSettings(string name,
                                  double relShare,
                                  IActivationSettings activationCfg,
                                  PredictorsProviderSettings predictorsCfg,
                                  double firingThreshold           = DefaultFiringThreshold,
                                  int thresholdMaxRefDeepness      = DefaultThresholdMaxRefDeepness,
                                  RandomValueSettings biasCfg      = null,
                                  RetainmentSettings retainmentCfg = null
                                  )
 {
     Name                    = name;
     RelShare                = relShare;
     ActivationCfg           = (IActivationSettings)activationCfg.DeepClone();
     PredictorsCfg           = (PredictorsProviderSettings)predictorsCfg.DeepClone();
     FiringThreshold         = firingThreshold;
     ThresholdMaxRefDeepness = thresholdMaxRefDeepness;
     BiasCfg                 = biasCfg == null ? null : (RandomValueSettings)biasCfg.DeepClone();
     RetainmentCfg           = retainmentCfg == null ? null : (RetainmentSettings)retainmentCfg.DeepClone();
     Check();
     return;
 }