org.apache.ignite.ml.structures

## Class LabeledVector<L>

- java.lang.Object
- - org.apache.ignite.ml.structures.DatasetRow<Vector>
  - - org.apache.ignite.ml.structures.LabeledVector<L>

- Type Parameters:
    `L` - Type of label.
  All Implemented Interfaces:
    Externalizable, Serializable
  Direct Known Subclasses:
    BootstrappedVector

      public class LabeledVector<L>
      extends DatasetRow<Vector>

  Class for vector with label.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.apache.ignite.ml.structures.DatasetRow

      `vector`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LabeledVector()` Default constructor.
    `LabeledVector(Vector vector, L lb)` Construct labeled vector.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `L` | `getLb()`
    `int` | `hashCode()`
    `L` | `label()` Get the label.
    `void` | `readExternal(ObjectInput in)`
    `void` | `setLabel(L lb)` Set the label
    `void` | `writeExternal(ObjectOutput out)`

    - ### Methods inherited from class org.apache.ignite.ml.structures.DatasetRow

      `features, get, getRaw, getVector, set, size`

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

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

- - ### Constructor Detail

    - #### LabeledVector

          public LabeledVector()

      Default constructor.

    - #### LabeledVector

          public LabeledVector(Vector vector,
                               L lb)

      Construct labeled vector.
      Parameters:
        `vector` - Vector.
        `lb` - Label.

  - ### Method Detail

    - #### label

          public L label()

      Get the label.
      Returns:
        Label.

    - #### setLabel

          public void setLabel(L lb)

      Set the label
      Parameters:
        `lb` - Label.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `DatasetRow<Vector>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `DatasetRow<Vector>`

    - #### writeExternal

          public void writeExternal(ObjectOutput out)
                             throws IOException

      Specified by:
        `writeExternal` in interface `Externalizable`
      Overrides:
        `writeExternal` in class `DatasetRow<Vector>`
      Throws:
        `IOException`

    - #### readExternal

          public void readExternal(ObjectInput in)
                            throws IOException,
                                   ClassNotFoundException

      Specified by:
        `readExternal` in interface `Externalizable`
      Overrides:
        `readExternal` in class `DatasetRow<Vector>`
      Throws:
        `IOException`
        `ClassNotFoundException`

    - #### getLb

          public L getLb()

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022