Record Class Protein

java.lang.Object
java.lang.Record
smile.datasets.Protein

public record Protein(BinarySparseSequenceDataset train, BinarySparseSequenceDataset test) extends Record
Protein sequence dataset.
  • Constructor Details

    • Protein

      public Protein() throws IOException
      Constructor.
      Throws:
      IOException - when fails to read the file.
    • Protein

      public Protein(Path trainDataPath, Path testDataPath) throws IOException
      Constructor.
      Parameters:
      trainDataPath - the path to training data file.
      testDataPath - the path to testing data file.
      Throws:
      IOException - when fails to read the file.
    • Protein

      Creates an instance of a Protein record class.
      Parameters:
      train - the value for the train record component
      test - the value for the test record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • train

      Returns the value of the train record component.
      Returns:
      the value of the train record component
    • test

      Returns the value of the test record component.
      Returns:
      the value of the test record component