//Constructor /// <summary> /// Creates an initialized instance /// </summary> /// <param name="settings">Configuration</param> /// <param name="seek"> /// Initial seek of the random generator. /// Specify seek less than 0 to obtain different initialization each time Reset is invoked. /// </param> public RandomGenerator(RandomValueSettings settings, int seek = 0) { _settings = settings.DeepClone(); _seek = seek; Reset(); return; }
//Constructor /// <summary> /// Creates an initialized instance. /// </summary> /// <param name="cfg">The RandomValue configuration.</param> /// <param name="seek">The initial seek of the random generator. Specify the seek less than 0 to obtain different initialization each time the Reset is invoked.</param> public RandomGenerator(RandomValueSettings cfg, int seek = 0) { _cfg = (RandomValueSettings)cfg.DeepClone(); _seek = seek; Reset(); return; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="stimuliCoeff">Input stimuli coefficient (pA)</param> /// <param name="timeScale">Membrane time scale (ms)</param> /// <param name="resistance">Membrane resistance (Mohm)</param> /// <param name="restV">Membrane rest potential (mV)</param> /// <param name="resetV">Membrane reset potential (mV)</param> /// <param name="rheobaseV">Membrane rheobase threshold (mV)</param> /// <param name="firingThresholdV">Membrane firing threshold (mV)</param> /// <param name="sharpnessDeltaT">Sharpness of membrane potential change (mV)</param> /// <param name="refractoryPeriods">Number of after spike computation cycles while an input stimuli is ignored (ms)</param> /// <param name="solverMethod">ODE numerical solver method</param> /// <param name="solverCompSteps">ODE numerical solver computation steps of the time step</param> public ExpIFSettings(double stimuliCoeff, RandomValueSettings timeScale, RandomValueSettings resistance, RandomValueSettings restV, RandomValueSettings resetV, RandomValueSettings rheobaseV, RandomValueSettings firingThresholdV, RandomValueSettings sharpnessDeltaT, int refractoryPeriods, ODENumSolver.Method solverMethod, int solverCompSteps ) { StimuliCoeff = stimuliCoeff; TimeScale = timeScale.DeepClone(); Resistance = resistance.DeepClone(); RestV = restV.DeepClone(); ResetV = resetV.DeepClone(); RheobaseV = rheobaseV.DeepClone(); FiringThresholdV = firingThresholdV.DeepClone(); SharpnessDeltaT = sharpnessDeltaT.DeepClone(); RefractoryPeriods = refractoryPeriods; SolverMethod = solverMethod; SolverCompSteps = solverCompSteps; return; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="stimuliCoeff">Input stimuli coefficient (pA)</param> /// <param name="timeScale">Membrane time scale (ms)</param> /// <param name="resistance">Membrane resistance (Mohm)</param> /// <param name="restV">Membrane rest potential (mV)</param> /// <param name="resetV">Membrane reset potential (mV)</param> /// <param name="rheobaseV">Membrane rheobase threshold (mV)</param> /// <param name="firingThresholdV">Membrane firing threshold (mV)</param> /// <param name="sharpnessDeltaT">Sharpness of membrane potential change (mV)</param> /// <param name="adaptationVoltageCoupling">Adaptation voltage coupling (nS)</param> /// <param name="adaptationTimeConstant">Adaptation time constant (ms)</param> /// <param name="adaptationSpikeTriggeredIncrement">Spike triggered adaptation increment (pA)</param> /// <param name="solverMethod">ODE numerical solver method</param> /// <param name="solverCompSteps">ODE numerical solver computation steps of the time step</param> public AdExpIFSettings(double stimuliCoeff, RandomValueSettings timeScale, RandomValueSettings resistance, RandomValueSettings restV, RandomValueSettings resetV, RandomValueSettings rheobaseV, RandomValueSettings firingThresholdV, RandomValueSettings sharpnessDeltaT, RandomValueSettings adaptationVoltageCoupling, RandomValueSettings adaptationTimeConstant, RandomValueSettings adaptationSpikeTriggeredIncrement, ODENumSolver.Method solverMethod, int solverCompSteps ) { StimuliCoeff = stimuliCoeff; TimeScale = timeScale.DeepClone(); Resistance = resistance.DeepClone(); RestV = restV.DeepClone(); ResetV = resetV.DeepClone(); RheobaseV = rheobaseV.DeepClone(); FiringThresholdV = firingThresholdV.DeepClone(); SharpnessDeltaT = sharpnessDeltaT.DeepClone(); AdaptationVoltageCoupling = adaptationVoltageCoupling.DeepClone(); AdaptationTimeConstant = adaptationTimeConstant.DeepClone(); AdaptationSpikeTriggeredIncrement = adaptationSpikeTriggeredIncrement.DeepClone(); SolverMethod = solverMethod; SolverCompSteps = solverCompSteps; return; }
/// <summary> /// Creates initialized instance /// </summary> /// <param name="restingEfficacy">Synapse's resting efficacy (average probability of neurotransmitter release)</param> /// <param name="tauDepression">Synapse's efficacy depression model time constant (ms)</param> /// <param name="tauFacilitation">Synapse's efficacy facilitation model time constant (ms)</param> /// <param name="applyShortTermPlasticity">Specifies whether to apply short-term plasticity</param> /// <param name="weightCfg">Synapse's random weight settings</param> public DynamicsSettings(double restingEfficacy, double tauDepression, double tauFacilitation, bool applyShortTermPlasticity, RandomValueSettings weightCfg = null ) { RestingEfficacy = restingEfficacy; TauDepression = tauDepression; TauFacilitation = tauFacilitation; ApplyShortTermPlasticity = applyShortTermPlasticity; WeightCfg = (weightCfg == null ? new RandomValueSettings(0, 1) : weightCfg.DeepClone()); return; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="stimuliCoeff">Initial input stimuli coefficient (pA)</param> /// <param name="resistance">Membrane resistance (Mohm)</param> /// <param name="decayRate">Membrane potential decay rate</param> /// <param name="resetV">Membrane reset potential (mV)</param> /// <param name="firingThresholdV">Membrane firing threshold (mV)</param> /// <param name="refractoryPeriods">Number of after spike computation cycles while an input stimuli is ignored (ms)</param> public SimpleIFSettings(double stimuliCoeff, RandomValueSettings resistance, RandomValueSettings decayRate, RandomValueSettings resetV, RandomValueSettings firingThresholdV, int refractoryPeriods ) { StimuliCoeff = stimuliCoeff; Resistance = resistance.DeepClone(); DecayRate = decayRate.DeepClone(); ResetV = resetV.DeepClone(); FiringThresholdV = firingThresholdV.DeepClone(); RefractoryPeriods = refractoryPeriods; return; }
//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; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="stimuliCoeff">Input stimuli coefficient (pA)</param> /// <param name="recoveryTimeScale">Time scale of the recovery variable</param> /// <param name="recoverySensitivity">Sensitivity of the recovery variable to the subthreshold fluctuations of the membrane potential</param> /// <param name="recoveryReset">After-spike reset of the recovery variable</param> /// <param name="restV">Membrane rest potential (mV)</param> /// <param name="resetV">Membrane reset potential (mV)</param> /// <param name="firingThresholdV">Membrane firing threshold (mV)</param> /// <param name="refractoryPeriods">Number of after spike computation cycles while an input stimuli is ignored (ms)</param> /// <param name="solverMethod">ODE numerical solver method</param> /// <param name="solverCompSteps">ODE numerical solver computation steps of the time step</param> public IzhikevichIFSettings(double stimuliCoeff, RandomValueSettings recoveryTimeScale, RandomValueSettings recoverySensitivity, RandomValueSettings recoveryReset, RandomValueSettings restV, RandomValueSettings resetV, RandomValueSettings firingThresholdV, int refractoryPeriods, ODENumSolver.Method solverMethod, int solverCompSteps ) { StimuliCoeff = stimuliCoeff; RecoveryTimeScale = recoveryTimeScale.DeepClone(); RecoverySensitivity = recoverySensitivity.DeepClone(); RecoveryReset = recoveryReset.DeepClone(); RestV = restV.DeepClone(); ResetV = resetV.DeepClone(); FiringThresholdV = firingThresholdV.DeepClone(); RefractoryPeriods = refractoryPeriods; SolverMethod = solverMethod; SolverCompSteps = solverCompSteps; return; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="alpha">The Alpha</param> public ISRUSettings(RandomValueSettings alpha) { Alpha = alpha.DeepClone(); return; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="negSlope">The negative slope</param> public LeakyReLUSettings(RandomValueSettings negSlope) { NegSlope = negSlope.DeepClone(); return; }
//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; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="alpha">The Alpha</param> public SoftExponentialSettings(RandomValueSettings alpha) { Alpha = alpha.DeepClone(); return; }
//Constructors /// <summary> /// Creates an initialized instance /// </summary> /// <param name="slope">Slope of the curve</param> public ElliotSettings(RandomValueSettings slope) { Slope = slope.DeepClone(); return; }