Record Class CsvDataLoader.ClassificationData
java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.problems.grammar.CsvDataLoader.ClassificationData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne classification row. -
Constructor Summary
ConstructorsConstructorDescriptionClassificationData(List<CsvDataLoader.ClassificationData.Row> rows, List<String> featureOrder, List<String> classValues, Map<String, Integer> classIndexByLabel) Creates an instance of aClassificationDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintNumber of distinct classes.intclassIndex(String label) Resolves class label into a dense class index.Returns the value of theclassIndexByLabelrecord component.Returns the value of theclassValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefeatureOrderrecord component.final inthashCode()Returns a hash code value for this object.rows()Returns the value of therowsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassificationData
public ClassificationData(List<CsvDataLoader.ClassificationData.Row> rows, List<String> featureOrder, List<String> classValues, Map<String, Integer> classIndexByLabel) Creates an instance of aClassificationDatarecord class.- Parameters:
rows- the value for therowsrecord componentfeatureOrder- the value for thefeatureOrderrecord componentclassValues- the value for theclassValuesrecord componentclassIndexByLabel- the value for theclassIndexByLabelrecord component
-
-
Method Details
-
classCount
public int classCount()Number of distinct classes. -
classIndex
Resolves class label into a dense class index. -
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
rows
Returns the value of therowsrecord component.- Returns:
- the value of the
rowsrecord component
-
featureOrder
-
classValues
-
classIndexByLabel
-