Interface InstanceSetWriter<U>

Type Parameters:
U - Type of the users
All Known Implementing Classes:
LETORInstanceWriter

public interface InstanceSetWriter<U>
Class for writing patterns in different formats.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String write​(Instance<U> instance)
    Obtains an string containing the information for a single instance.
    void write​(java.io.Writer write, FeatureInformation featInfo)
    Writes the feature information of a file.
    void write​(java.io.Writer write, Instance<U> instance)
    Writes an individual instance into a file.
    void write​(java.lang.String file, InstanceSet<U> instanceSet)
    Writes a dataset into a file.
    java.lang.String writeFeatureInfo​(FeatureInformation featInfo)
    Obtains an string with all the information about the features of a dataset.
  • Method Details

    • write

      void write​(java.lang.String file, InstanceSet<U> instanceSet) throws java.io.IOException
      Writes a dataset into a file.
      Parameters:
      file - the name of the file.
      instanceSet - the instance set to store.
      Throws:
      java.io.IOException - if something fails while writing.
    • writeFeatureInfo

      java.lang.String writeFeatureInfo​(FeatureInformation featInfo)
      Obtains an string with all the information about the features of a dataset.
      Parameters:
      featInfo - the feature information.
      Returns:
      a String containing the information about the features.
    • write

      void write​(java.io.Writer write, FeatureInformation featInfo) throws java.io.IOException
      Writes the feature information of a file.
      Parameters:
      write - the writer.
      featInfo - feature information to write.
      Throws:
      java.io.IOException - if something fails while writing.
    • write

      void write​(java.io.Writer write, Instance<U> instance) throws java.io.IOException
      Writes an individual instance into a file.
      Parameters:
      write - the writer.
      instance - the instance to write.
      Throws:
      java.io.IOException - if something fails while writing.
    • write

      java.lang.String write​(Instance<U> instance)
      Obtains an string containing the information for a single instance.
      Parameters:
      instance - the instance.
      Returns:
      an string containing all the necessary information.