Documentation of 'jsat.io.DataWriter' Java class
DataWriter
jsat.io

Class DataWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable


    public abstract class DataWriter
    extends java.lang.Object
    implements java.io.Closeable
    This interface defines a contract by which datapoints may be written out to a dataset file (such as a CSV) in an incremental fashion. This object is thread safe for all methods.
    • Field Detail

      • catInfo

        public final CategoricalData[] catInfo
        the categorical feature information for the whole corpus
      • dim

        public final int dim
        the number of numeric features for the whole corpus
    • Constructor Detail

    • Method Detail

      • writePoint

        public void writePoint(DataPoint dp,
                               double label)
                        throws java.io.IOException
        Write out the given data point to the output stream
        Parameters:
        dp - the data point to write to the file
        label - The associated label for this dataum. If type is a DataWriter.DataSetType.SIMPLE set, this value will be ignored. If DataWriter.DataSetType.CLASSIFICATION, the value will be assumed to be an integer class label.
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.