ml.dmlc.xgboost4j.java

## Class ColumnBatch

- java.lang.Object
- - ml.dmlc.xgboost4j.java.ColumnBatch

- All Implemented Interfaces:
    AutoCloseable

      public abstract class ColumnBatch
      extends Object
      implements AutoCloseable

  The abstracted XGBoost ColumnBatch to get array interface from columnar data format. For example, the cuDF dataframe which employs apache arrow specification.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColumnBatch()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `String` | `getArrayInterfaceJson()` Get the cuda array interface json string for the whole ColumnBatch including the must-have feature, label columns and the optional weight, base margin columns.
    `abstract String` | `getBaseMarginsArrayInterface()` Get the cuda array interface of the base margin columns.
    `abstract String` | `getFeatureArrayInterface()` Get the cuda array interface of the feature columns.
    `abstract String` | `getLabelsArrayInterface()` Get the cuda array interface of the label columns.
    `abstract String` | `getWeightsArrayInterface()` Get the cuda array interface of the weight columns.

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

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

- - ### Constructor Detail

    - #### ColumnBatch

          public ColumnBatch()

  - ### Method Detail

    - #### getArrayInterfaceJson

          public final String getArrayInterfaceJson()

      Get the cuda array interface json string for the whole ColumnBatch including the must-have feature, label columns and the optional weight, base margin columns. This function is be called by native code during iteration and can be made as private method. We keep it as public simply to silent the linter.

    - #### getFeatureArrayInterface

          public abstract String getFeatureArrayInterface()

      Get the cuda array interface of the feature columns. The returned value must not be null or empty

    - #### getLabelsArrayInterface

          public abstract String getLabelsArrayInterface()

      Get the cuda array interface of the label columns. The returned value must not be null or empty if we're creating `DeviceQuantileDMatrix(Iterator, float, int, int)`

    - #### getWeightsArrayInterface

          public abstract String getWeightsArrayInterface()

      Get the cuda array interface of the weight columns. The returned value can be null or empty

    - #### getBaseMarginsArrayInterface

          public abstract String getBaseMarginsArrayInterface()

      Get the cuda array interface of the base margin columns. The returned value can be null or empty

    - #### close

          public void close()
                     throws Exception

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `Exception`

Copyright © 2022. All rights reserved.