Documentation of 'smile.sort.IQAgent' Java class
IQAgent
smile.sort

Class IQAgent



  • public class IQAgent
    extends java.lang.Object
    This class provide a robust and extremely fast algorithm to estimate arbitary quantile values from a continuing stream of data values. Basically, the data values fly by in a stream. We look at each value only once and do a constant-time process on it. From time to time, we can use this class to report any arbitary p-quantile value of the data that we have seen thus far.
    • Constructor Summary

      Constructors 
      Constructor and Description
      IQAgent()
      Constructor.
      IQAgent(int nbuf)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(double datum)
      Assimilate a new value from the stream.
      double quantile(double p)
      Returns the estimated p-quantile for the data seen so far.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IQAgent

        public IQAgent()
        Constructor. The batch size is set to 1000.
      • IQAgent

        public IQAgent(int nbuf)
        Constructor.
        Parameters:
        nbuf - batch size. You may use 10000 if you expected > 106 data values. Otherwise, 1000 should be fine.
    • Method Detail

      • add

        public void add(double datum)
        Assimilate a new value from the stream.
      • quantile

        public double quantile(double p)
        Returns the estimated p-quantile for the data seen so far. For example, p = 0.5 for median.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.