public class DeviceQuantileDMatrix extends DMatrix
DMatrix.SparseType
Constructor and Description |
---|
DeviceQuantileDMatrix(Iterator<ColumnBatch> iter,
float missing,
int maxBin,
int nthread)
Create DeviceQuantileDMatrix from iterator based on the cuda array interface
|
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
|
dispose, finalize, getBaseMargin, getFeatureNames, getFeatureTypes, getGroup, getHandle, getLabel, getWeight, rowNum, saveBinary, setFeatureNames, setFeatureTypes, slice
public DeviceQuantileDMatrix(Iterator<ColumnBatch> iter, float missing, int maxBin, int nthread) throws XGBoostError
iter
- the XGBoost ColumnBatch batch to provide the corresponding cuda array interfacemissing
- the missing valuemaxBin
- the max binnthread
- the parallelismXGBoostError
public void setLabel(Column column) throws XGBoostError
DMatrix
setLabel
in class DMatrix
column
- the XGBoost Column to provide the cuda array interface
of label columnXGBoostError
- native errorpublic void setWeight(Column column) throws XGBoostError
DMatrix
setWeight
in class DMatrix
column
- the XGBoost Column to provide the cuda array interface
of weight columnXGBoostError
- native errorpublic void setBaseMargin(Column column) throws XGBoostError
DMatrix
setBaseMargin
in class DMatrix
column
- the XGBoost Column to provide the cuda array interface
of base margin columnXGBoostError
- native errorpublic void setLabel(float[] labels) throws XGBoostError
DMatrix
setLabel
in class DMatrix
labels
- labelsXGBoostError
- native errorpublic void setWeight(float[] weights) throws XGBoostError
DMatrix
setWeight
in class DMatrix
weights
- weightsXGBoostError
- native errorpublic void setBaseMargin(float[] baseMargin) throws XGBoostError
DMatrix
setBaseMargin
in class DMatrix
XGBoostError
public void setBaseMargin(float[][] baseMargin) throws XGBoostError
DMatrix
setBaseMargin
in class DMatrix
XGBoostError
public void setGroup(int[] group) throws XGBoostError
DMatrix
setGroup
in class DMatrix
group
- group size as arrayXGBoostError
- native errorCopyright © 2023. All rights reserved.