Class RealValueFileEventStream

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Trains and writes a model based on the events in the specified event file.
      static float[] parseContexts​(java.lang.String[] contexts)
      Parses the specified contexts and re-populates context array with features and returns the values for these features.
      Event read()
      Returns the next object.
      • Methods inherited from class java.lang.Object

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

      • RealValueFileEventStream

        public RealValueFileEventStream​(java.lang.String fileName)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • RealValueFileEventStream

        public RealValueFileEventStream​(java.lang.String fileName,
                                        java.lang.String encoding)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • RealValueFileEventStream

        public RealValueFileEventStream​(java.io.File file)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • parseContexts

        public static float[] parseContexts​(java.lang.String[] contexts)
        Parses the specified contexts and re-populates context array with features and returns the values for these features. If all values are unspecified, then null is returned.
        Parameters:
        contexts - The contexts with real values specified.
        Returns:
        The value for each context or null if all values are unspecified.
      • read

        public Event read()
                   throws java.io.IOException
        Description copied from interface: ObjectStream
        Returns the next object. Calling this method repeatedly until it returns null will return each object from the underlying source exactly once.
        Specified by:
        read in interface ObjectStream<Event>
        Overrides:
        read in class FileEventStream
        Returns:
        the next object or null to signal that the stream is exhausted
        Throws:
        java.io.IOException - if there is an error during reading
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Trains and writes a model based on the events in the specified event file. the name of the model created is based on the event file name.
        Parameters:
        args - eventfile [iterations cuttoff]
        Throws:
        java.io.IOException - when the eventfile can not be read or the model file can not be written.