Medial Code Documentation
|
DMatrix for xgboost. More...
Data Structures | |
enum | SparseType |
sparse matrix type (CSR or CSC) | |
Public Member Functions | |
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 | 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 | 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. | |
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) | |
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 () |
Protected Member Functions | |
DMatrix (long handle) | |
used for DMatrix slice | |
void | finalize () |
Protected Attributes | |
long | handle = 0 |
DMatrix for xgboost.
|
inline |
Create DMatrix from iterator.
iter | The data iterator of mini batch to provide the data. |
cacheInfo | Cache path information, used for external memory setting, can be null. |
XGBoostError |
|
inline |
Create DMatrix by loading libsvm file from dataPath.
dataPath | The path to the data. |
XGBoostError |
|
inline |
Create DMatrix from Sparse matrix in CSR/CSC format.
headers | The row index of the matrix. |
indices | The indices of presenting entries. |
data | The data content. |
st | Type of sparsity. |
XGBoostError |
|
inline |
Create DMatrix from Sparse matrix in CSR/CSC format.
headers | The row index of the matrix. |
indices | The indices of presenting entries. |
data | The data content. |
st | Type of sparsity. |
shapeParam | when st is CSR, it specifies the column number, otherwise it is taken as row number |
XGBoostError |
|
inline |
create DMatrix from dense matrix
data | data values |
nrow | number of rows |
ncol | number of columns |
XGBoostError | native error |
DMatrix(float[], int, int, float)
|
inline |
create DMatrix from a BigDenseMatrix
matrix | instance of BigDenseMatrix |
XGBoostError | native error |
|
inline |
create DMatrix from dense matrix
data | data values |
nrow | number of rows |
ncol | number of columns |
missing | the specified value to represent the missing value |
|
inline |
create DMatrix from dense matrix
matrix | instance of BigDenseMatrix |
missing | the specified value to represent the missing value |
|
inline |
Create the normal DMatrix from column array interface.
columnBatch | the XGBoost ColumnBatch to provide the cuda array interface of feature columns |
missing | missing value |
nthread | threads number |
XGBoostError |
|
inline |
Get feature names.
XGBoostError |
|
inline |
Get feature types.
XGBoostError |
|
inline |
Get group sizes of DMatrix.
XGBoostError | native error |
|
inline |
get label values
XGBoostError | native error |
|
inline |
get weight of the DMatrix
XGBoostError | native error |
|
inline |
Get the number of non-missing values of DMatrix.
XGBoostError | native error |
|
inline |
get the row number of DMatrix
XGBoostError | native error |
|
inline |
Set base margin of DMatrix from cuda array interface.
column | the XGBoost Column to provide the cuda array interface of base margin column |
XGBoostError | native error |
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
Set base margin (initial prediction).
The margin must have the same number of elements as the number of rows in this matrix.
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
Set base margin (initial prediction).
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
Set feature names.
values | feature names to be set |
XGBoostError |
|
inline |
Set feature types.
values | feature types to be set |
XGBoostError |
|
inline |
Set group sizes of DMatrix (used for ranking)
group | group size as array |
XGBoostError | native error |
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
Set label of DMatrix from cuda array interface.
column | the XGBoost Column to provide the cuda array interface of label column |
XGBoostError | native error |
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
set label of dmatrix
labels | labels |
XGBoostError | native error |
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
Set weight of DMatrix from cuda array interface.
column | the XGBoost Column to provide the cuda array interface of weight column |
XGBoostError | native error |
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
set weight of each instance
weights | weights |
XGBoostError | native error |
Reimplemented in ml.dmlc.xgboost4j.java.QuantileDMatrix.
|
inline |
Slice the DMatrix and return a new DMatrix that only contains rowIndex
.
rowIndex | row index |
XGBoostError | native error |