Interface InstanceSetReader<U>

Type Parameters:
U - type of the users.
All Known Implementing Classes:
LETORInstanceReader

public interface InstanceSetReader<U>
Interface for reading an instance set for link prediction / contact recommendation.
  • Method Summary

    Modifier and Type Method Description
    InstanceSet<U> read​(java.lang.String file)
    Given a file, reads an instance set.
    FeatureInformation readHeader​(java.util.List<java.lang.String> header)
    Reads the header of the file into an object containing all information about features.
    Instance<U> readInstance​(java.lang.String line, int numFeats)
    Reads an individual instance.
  • Method Details

    • read

      InstanceSet<U> read​(java.lang.String file) throws java.io.IOException
      Given a file, reads an instance set.
      Parameters:
      file - the file.
      Returns:
      the instance set which has been read.
      Throws:
      java.io.IOException - if something fails while reading.
    • readHeader

      FeatureInformation readHeader​(java.util.List<java.lang.String> header)
      Reads the header of the file into an object containing all information about features.
      Parameters:
      header - the header lines.
      Returns:
      an object containing information about features.
    • readInstance

      Instance<U> readInstance​(java.lang.String line, int numFeats)
      Reads an individual instance.
      Parameters:
      line - the line string containing the instance.
      numFeats - the number of features.
      Returns:
      the instance.