Record Class SimpleTrainingTestSplit
java.lang.Object
java.lang.Record
org.coordinatekit.crf.mallet.train.SimpleTrainingTestSplit
- Record Components:
training- the instances to use for model trainingtest- the instances to use for model evaluation; may be empty ifMalletCrfTrainerConfiguration.trainingFraction()is 1.0
- All Implemented Interfaces:
TrainingTestSplit
public record SimpleTrainingTestSplit(cc.mallet.types.InstanceList training, cc.mallet.types.InstanceList test)
extends Record
implements TrainingTestSplit
A container for training and test data splits.
This record holds the results of splitting a dataset into training and test sets. Both
InstanceLists share the same Alphabet for features and LabelAlphabet for
labels, ensuring consistent encoding across the split.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTrainingTestSplit(cc.mallet.types.InstanceList training, cc.mallet.types.InstanceList test) Creates an instance of aSimpleTrainingTestSplitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.cc.mallet.types.InstanceListtest()Returns the value of thetestrecord component.final StringtoString()Returns a string representation of this record class.cc.mallet.types.InstanceListtraining()Returns the value of thetrainingrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.coordinatekit.crf.mallet.train.TrainingTestSplit
size
-
Constructor Details
-
SimpleTrainingTestSplit
public SimpleTrainingTestSplit(cc.mallet.types.InstanceList training, cc.mallet.types.InstanceList test) Creates an instance of aSimpleTrainingTestSplitrecord class.
-
-
Method Details
-
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. -
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. -
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). -
training
public cc.mallet.types.InstanceList training()Returns the value of thetrainingrecord component.- Specified by:
trainingin interfaceTrainingTestSplit- Returns:
- the value of the
trainingrecord component
-
test
public cc.mallet.types.InstanceList test()Returns the value of thetestrecord component.- Specified by:
testin interfaceTrainingTestSplit- Returns:
- the value of the
testrecord component
-