Class TrainTestSplitAlignment
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_ml.util.TrainTestSplitAlignment
A class which can do a train test split for arbitrary data items.
It also works with stratification.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTrainTestSplitAlignment
(Alignment alignment, double train_ratio) TrainTestSplitAlignment
(Alignment alignment, double train_ratio, long seed) TrainTestSplitAlignment
(Alignment alignment, double train_ratio, long seed, Function<Correspondence, ?> stratify) TrainTestSplitAlignment
(Alignment alignment, double train_ratio, Function<Correspondence, ?> stratify) TrainTestSplitAlignment
(Alignment alignment, double train_ratio, Random rnd) TrainTestSplitAlignment
(Alignment alignment, double train_ratio, Random rnd, Function<Correspondence, ?> stratify) -
Method Summary
Modifier and TypeMethodDescriptiongetTest()
Returns the test alignment.getTrain()
Returns the training alignment.private void
initializeTrainTest
(Alignment alignment, TrainTestSplit<Correspondence> split)
-
Field Details
-
train
-
test
-
-
Constructor Details
-
TrainTestSplitAlignment
public TrainTestSplitAlignment(Alignment alignment, double train_ratio, Random rnd, Function<Correspondence, ?> stratify) -
TrainTestSplitAlignment
public TrainTestSplitAlignment(Alignment alignment, double train_ratio, long seed, Function<Correspondence, ?> stratify) -
TrainTestSplitAlignment
public TrainTestSplitAlignment(Alignment alignment, double train_ratio, Function<Correspondence, ?> stratify) -
TrainTestSplitAlignment
-
TrainTestSplitAlignment
-
TrainTestSplitAlignment
-
-
Method Details
-
initializeTrainTest
-
getTrain
Returns the training alignment. This will return each time a new copy of the alignment such that changes to this object will not be reflected in multiple calls to this method.- Returns:
- training alignment
-
getTest
Returns the test alignment. This will return each time a new copy of the alignment such that changes to this object will not be reflected in multiple calls to this method.- Returns:
- test alignment
-