org.apache.ignite.ml.structures

## Class LabeledVectorSetTestTrainPair

- java.lang.Object
- - org.apache.ignite.ml.structures.LabeledVectorSetTestTrainPair

- All Implemented Interfaces:
    Serializable

      public class LabeledVectorSetTestTrainPair
      extends Object
      implements Serializable

  Class for splitting Labeled Dataset on train and test sets.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LabeledVectorSetTestTrainPair(LabeledVectorSet dataset, double testPercentage)` Creates two subsets of given dataset.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LabeledVectorSet` | `test()` Test subset of the whole dataset.
    `LabeledVectorSet` | `train()` Train subset of the whole dataset.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LabeledVectorSetTestTrainPair

          public LabeledVectorSetTestTrainPair(LabeledVectorSet dataset,
                                               double testPercentage)

      Creates two subsets of given dataset.

      NOTE: This method uses next algorithm with O(n log n) by calculations and O(n) by memory.

      Parameters:
        `dataset` - The dataset to split on train and test subsets.
        `testPercentage` - The percentage of the test subset.

  - ### Method Detail

    - #### train

          public LabeledVectorSet train()

      Train subset of the whole dataset.
      Returns:
        Train subset.

    - #### test

          public LabeledVectorSet test()

      Test subset of the whole dataset.
      Returns:
        Test subset.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022