Class Fire<T extends java.lang.Comparable<T>>

  • Direct Known Subclasses:
    IntFire, LongFire

    public abstract class Fire<T extends java.lang.Comparable<T>>
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Constructor Description
      Fire​(int learning_rate)  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract T predict​(T value)
      predict the incoming integer using the last value
      abstract void train​(T pre, T val, T err)
      train the learning machine with the last prediction
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • learnShift

        protected int learnShift
      • bitWidth

        protected int bitWidth
      • accumulator

        protected int accumulator
      • delta

        protected T extends java.lang.Comparable<T> delta
    • 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