/// <inheritdoc/>
        public double Compute(BasicStat continuousActivationStat,
                              BasicStat continuousActivationDiffStat,
                              MovingDataWindow activationMDW,
                              SimpleQueue <byte> firingMDW,
                              double activation,
                              double normalizedActivation,
                              bool spike
                              )
        {
            PredictorActivationRescaledRangeSettings cfg = (PredictorActivationRescaledRangeSettings)Cfg;

            if (activationMDW.UsedCapacity >= cfg.Window)
            {
                return(activationMDW.GetDataRescaledRange(cfg.Window));
            }
            else
            {
                return(0d);
            }
        }
예제 #2
0
 /// <summary>
 /// The copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public PredictorActivationRescaledRangeSettings(PredictorActivationRescaledRangeSettings source)
     : this(source.Window)
 {
     return;
 }
 //Constructor
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="cfg">The configuration of the predictor.</param>
 public PredictorActivationRescaledRange(PredictorActivationRescaledRangeSettings cfg)
 {
     Cfg = cfg;
     return;
 }