Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
ml.dmlc.xgboost4j.java.QuantileDMatrix Class Reference

QuantileDMatrix will only be used to train. More...

Inheritance diagram for ml.dmlc.xgboost4j.java.QuantileDMatrix:
ml.dmlc.xgboost4j.java.DMatrix

Public Member Functions

 QuantileDMatrix (Iterator< ColumnBatch > iter, float missing, int maxBin, int nthread) throws XGBoostError
 Create QuantileDMatrix from iterator based on the cuda array interface.
 
void setLabel (Column column) throws XGBoostError
 Set label of DMatrix from cuda array interface.
 
void setWeight (Column column) throws XGBoostError
 Set weight of DMatrix from cuda array interface.
 
void setBaseMargin (Column column) throws XGBoostError
 Set base margin of DMatrix from cuda array interface.
 
void setLabel (float[] labels) throws XGBoostError
 set label of dmatrix
 
void setWeight (float[] weights) throws XGBoostError
 set weight of each instance
 
void setBaseMargin (float[] baseMargin) throws XGBoostError
 Set base margin (initial prediction).
 
void setBaseMargin (float[][] baseMargin) throws XGBoostError
 Set base margin (initial prediction).
 
void setGroup (int[] group) throws XGBoostError
 Set group sizes of DMatrix (used for ranking)
 
- Public Member Functions inherited from ml.dmlc.xgboost4j.java.DMatrix
 DMatrix (Iterator< LabeledPoint > iter, String cacheInfo) throws XGBoostError
 Create DMatrix from iterator.
 
 DMatrix (String dataPath) throws XGBoostError
 Create DMatrix by loading libsvm file from dataPath.
 
 DMatrix (long[] headers, int[] indices, float[] data, DMatrix.SparseType st) throws XGBoostError
 Create DMatrix from Sparse matrix in CSR/CSC format.
 
 DMatrix (long[] headers, int[] indices, float[] data, DMatrix.SparseType st, int shapeParam) throws XGBoostError
 Create DMatrix from Sparse matrix in CSR/CSC format.
 
 DMatrix (long[] headers, int[] indices, float[] data, DMatrix.SparseType st, int shapeParam, float missing, int nthread) throws XGBoostError
 
 DMatrix (float[] data, int nrow, int ncol) throws XGBoostError
 create DMatrix from dense matrix
 
 DMatrix (BigDenseMatrix matrix) throws XGBoostError
 create DMatrix from a BigDenseMatrix
 
 DMatrix (float[] data, int nrow, int ncol, float missing) throws XGBoostError
 create DMatrix from dense matrix
 
 DMatrix (BigDenseMatrix matrix, float missing) throws XGBoostError
 create DMatrix from dense matrix
 
 DMatrix (ColumnBatch columnBatch, float missing, int nthread) throws XGBoostError
 Create the normal DMatrix from column array interface.
 
void setFeatureNames (String[] values) throws XGBoostError
 Set feature names.
 
String[] getFeatureNames () throws XGBoostError
 Get feature names.
 
void setFeatureTypes (String[] values) throws XGBoostError
 Set feature types.
 
String[] getFeatureTypes () throws XGBoostError
 Get feature types.
 
int[] getGroup () throws XGBoostError
 Get group sizes of DMatrix.
 
float[] getLabel () throws XGBoostError
 get label values
 
float[] getWeight () throws XGBoostError
 get weight of the DMatrix
 
float[] getBaseMargin () throws XGBoostError
 Get base margin of the DMatrix.
 
DMatrix slice (int[] rowIndex) throws XGBoostError
 Slice the DMatrix and return a new DMatrix that only contains rowIndex.
 
long rowNum () throws XGBoostError
 get the row number of DMatrix
 
long nonMissingNum () throws XGBoostError
 Get the number of non-missing values of DMatrix.
 
void saveBinary (String filePath)
 save DMatrix to filePath
 
long getHandle ()
 Get the handle.
 
synchronized void dispose ()
 

Additional Inherited Members

- Protected Member Functions inherited from ml.dmlc.xgboost4j.java.DMatrix
 DMatrix (long handle)
 used for DMatrix slice
 
void finalize ()
 
- Protected Attributes inherited from ml.dmlc.xgboost4j.java.DMatrix
long handle = 0
 

Detailed Description

QuantileDMatrix will only be used to train.

Constructor & Destructor Documentation

◆ QuantileDMatrix()

ml.dmlc.xgboost4j.java.QuantileDMatrix.QuantileDMatrix ( Iterator< ColumnBatch iter,
float  missing,
int  maxBin,
int  nthread 
) throws XGBoostError
inline

Create QuantileDMatrix from iterator based on the cuda array interface.

Parameters
iterthe XGBoost ColumnBatch batch to provide the corresponding cuda array interface
missingthe missing value
maxBinthe max bin
nthreadthe parallelism
Exceptions
XGBoostError

Member Function Documentation

◆ setBaseMargin() [1/3]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setBaseMargin ( Column  column) throws XGBoostError
inline

Set base margin of DMatrix from cuda array interface.

Parameters
columnthe XGBoost Column to provide the cuda array interface of base margin column
Exceptions
XGBoostErrornative error

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setBaseMargin() [2/3]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setBaseMargin ( float[]  baseMargin) throws XGBoostError
inline

Set base margin (initial prediction).

The margin must have the same number of elements as the number of rows in this matrix.

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setBaseMargin() [3/3]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setBaseMargin ( float  baseMargin[][]) throws XGBoostError
inline

Set base margin (initial prediction).

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setGroup()

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setGroup ( int[]  group) throws XGBoostError
inline

Set group sizes of DMatrix (used for ranking)

Parameters
groupgroup size as array
Exceptions
XGBoostErrornative error

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setLabel() [1/2]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setLabel ( Column  column) throws XGBoostError
inline

Set label of DMatrix from cuda array interface.

Parameters
columnthe XGBoost Column to provide the cuda array interface of label column
Exceptions
XGBoostErrornative error

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setLabel() [2/2]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setLabel ( float[]  labels) throws XGBoostError
inline

set label of dmatrix

Parameters
labelslabels
Exceptions
XGBoostErrornative error

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setWeight() [1/2]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setWeight ( Column  column) throws XGBoostError
inline

Set weight of DMatrix from cuda array interface.

Parameters
columnthe XGBoost Column to provide the cuda array interface of weight column
Exceptions
XGBoostErrornative error

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.

◆ setWeight() [2/2]

void ml.dmlc.xgboost4j.java.QuantileDMatrix.setWeight ( float[]  weights) throws XGBoostError
inline

set weight of each instance

Parameters
weightsweights
Exceptions
XGBoostErrornative error

Reimplemented from ml.dmlc.xgboost4j.java.DMatrix.


The documentation for this class was generated from the following file: