Class Fire<T extends Comparable<T>>

  • Direct Known Subclasses:
    IntFire, LongFire

    public abstract class Fire<T extends Comparable<T>>
    extends Object
    This class is used for Fast Integer REgression in Sprintz encoding method.Users can create a Fire object and use it to train and predict the time-ordered integer-like data.
    • Field Detail

      • learnShift

        protected int learnShift
      • bitWidth

        protected int bitWidth
      • accumulator

        protected int accumulator
    • Constructor Detail

      • Fire

        public Fire​(int learning_rate)
    • Method Detail

      • predict

        public abstract T predict​(T value)
        predict the incoming integer using the last value
        Parameters:
        value - the last value
        Returns:
        the predicted value
      • train

        public abstract void train​(T pre,
                                   T val,
                                   T err)
        train the learning machine with the last prediction
        Parameters:
        pre - last value to be predicted
        val - current value to be predicted
        err - the predictive error of current value