ml.dmlc.xgboost4j.java

## Class DeviceQuantileDMatrix

- java.lang.Object
- - ml.dmlc.xgboost4j.java.DMatrix
  - - ml.dmlc.xgboost4j.java.DeviceQuantileDMatrix

-     public class DeviceQuantileDMatrix
      extends DMatrix

  DeviceQuantileDMatrix will only be used to train

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class ml.dmlc.xgboost4j.java.DMatrix

      `DMatrix.SparseType`

  - ### Field Summary

    - ### Fields inherited from class ml.dmlc.xgboost4j.java.DMatrix

      `handle`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeviceQuantileDMatrix(Iterator<ColumnBatch> iter, float missing, int maxBin, int nthread)` Create DeviceQuantileDMatrix from iterator based on the cuda array interface

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setBaseMargin(Column column)` Set base margin of DMatrix from cuda array interface
    `void` | `setBaseMargin(float[] baseMargin)` Set base margin (initial prediction).
    `void` | `setBaseMargin(float[][] baseMargin)` Set base margin (initial prediction).
    `void` | `setGroup(int[] group)` Set group sizes of DMatrix (used for ranking)
    `void` | `setLabel(Column column)` Set label of DMatrix from cuda array interface
    `void` | `setLabel(float[] labels)` set label of dmatrix
    `void` | `setWeight(Column column)` Set weight of DMatrix from cuda array interface
    `void` | `setWeight(float[] weights)` set weight of each instance

    - ### Methods inherited from class ml.dmlc.xgboost4j.java.DMatrix

      `dispose, finalize, getBaseMargin, getGroup, getHandle, getLabel, getWeight, rowNum, saveBinary, slice`

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

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

- - ### Constructor Detail

    - #### DeviceQuantileDMatrix

          public DeviceQuantileDMatrix(Iterator<ColumnBatch> iter,
                                       float missing,
                                       int maxBin,
                                       int nthread)
                                throws XGBoostError

      Create DeviceQuantileDMatrix from iterator based on the cuda array interface
      Parameters:
        `iter` - the XGBoost ColumnBatch batch to provide the corresponding cuda array interface
        `missing` - the missing value
        `maxBin` - the max bin
        `nthread` - the parallelism
      Throws:
        `XGBoostError`

  - ### Method Detail

    - #### setLabel

          public void setLabel(Column column)
                        throws XGBoostError

      Description copied from class: `DMatrix`
      Set label of DMatrix from cuda array interface
      Overrides:
        `setLabel` in class `DMatrix`
      Parameters:
        `column` - the XGBoost Column to provide the cuda array interface of label column
      Throws:
        `XGBoostError` - native error

    - #### setWeight

          public void setWeight(Column column)
                         throws XGBoostError

      Description copied from class: `DMatrix`
      Set weight of DMatrix from cuda array interface
      Overrides:
        `setWeight` in class `DMatrix`
      Parameters:
        `column` - the XGBoost Column to provide the cuda array interface of weight column
      Throws:
        `XGBoostError` - native error

    - #### setBaseMargin

          public void setBaseMargin(Column column)
                             throws XGBoostError

      Description copied from class: `DMatrix`
      Set base margin of DMatrix from cuda array interface
      Overrides:
        `setBaseMargin` in class `DMatrix`
      Parameters:
        `column` - the XGBoost Column to provide the cuda array interface of base margin column
      Throws:
        `XGBoostError` - native error

    - #### setLabel

          public void setLabel(float[] labels)
                        throws XGBoostError

      Description copied from class: `DMatrix`
      set label of dmatrix
      Overrides:
        `setLabel` in class `DMatrix`
      Parameters:
        `labels` - labels
      Throws:
        `XGBoostError` - native error

    - #### setWeight

          public void setWeight(float[] weights)
                         throws XGBoostError

      Description copied from class: `DMatrix`
      set weight of each instance
      Overrides:
        `setWeight` in class `DMatrix`
      Parameters:
        `weights` - weights
      Throws:
        `XGBoostError` - native error

    - #### setBaseMargin

          public void setBaseMargin(float[] baseMargin)
                             throws XGBoostError

      Description copied from class: `DMatrix`
      Set base margin (initial prediction). The margin must have the same number of elements as the number of rows in this matrix.
      Overrides:
        `setBaseMargin` in class `DMatrix`
      Throws:
        `XGBoostError`

    - #### setBaseMargin

          public void setBaseMargin(float[][] baseMargin)
                             throws XGBoostError

      Description copied from class: `DMatrix`
      Set base margin (initial prediction).
      Overrides:
        `setBaseMargin` in class `DMatrix`
      Throws:
        `XGBoostError`

    - #### setGroup

          public void setGroup(int[] group)
                        throws XGBoostError

      Description copied from class: `DMatrix`
      Set group sizes of DMatrix (used for ranking)
      Overrides:
        `setGroup` in class `DMatrix`
      Parameters:
        `group` - group size as array
      Throws:
        `XGBoostError` - native error

Copyright © 2022. All rights reserved.