Package | Description |
---|---|
ml.dmlc.xgboost4j.java |
Modifier and Type | Method and Description |
---|---|
void |
Booster.boost(DMatrix dtrain,
float[] grad,
float[] hess)
update with give grad and hess
|
static String[] |
XGBoost.crossValidation(DMatrix data,
Map<String,Object> params,
int round,
int nfold,
String[] metrics,
IObjective obj,
IEvaluation eval)
Cross-validation with given parameters.
|
String |
Booster.evalSet(DMatrix[] evalMatrixs,
String[] evalNames,
IEvaluation eval)
evaluate with given customized Evaluation class
|
String |
Booster.evalSet(DMatrix[] evalMatrixs,
String[] evalNames,
IEvaluation eval,
float[] metricsOut) |
String |
Booster.evalSet(DMatrix[] evalMatrixs,
String[] evalNames,
int iter)
evaluate with given dmatrixs.
|
String |
Booster.evalSet(DMatrix[] evalMatrixs,
String[] evalNames,
int iter,
float[] metricsOut)
evaluate with given dmatrixs.
|
String |
Booster.getAttr(String key)
Get attribute from the Booster.
|
Map<String,String> |
Booster.getAttrs()
Get attributes stored in the Booster as a Map.
|
float[] |
DMatrix.getBaseMargin()
Get base margin of the DMatrix.
|
Map<String,Integer> |
Booster.getFeatureScore(String featureMap)
Get importance of each feature
|
Map<String,Integer> |
Booster.getFeatureScore(String[] featureNames)
Get importance of each feature with specified feature names.
|
int[] |
DMatrix.getGroup()
Get group sizes of DMatrix
|
float[] |
DMatrix.getLabel()
get label values
|
String[] |
Booster.getModelDump(String[] featureNames,
boolean withStats)
Get the dump of the model as a string array with specified feature names.
|
String[] |
Booster.getModelDump(String[] featureNames,
boolean withStats,
String format) |
String[] |
Booster.getModelDump(String featureMap,
boolean withStats)
Get the dump of the model as a string array
|
String[] |
Booster.getModelDump(String featureMap,
boolean withStats,
String format) |
long |
Booster.getNumFeature()
Get number of model features.
|
static int |
Rabit.getRank()
get rank of current thread.
|
Map<String,Double> |
Booster.getScore(String[] featureNames,
String importanceType)
Get the feature importances for gain or cover (average or total)
|
Map<String,Double> |
Booster.getScore(String featureMap,
String importanceType)
Get the feature importances for gain or cover (average or total), with feature names
|
float[] |
DMatrix.getWeight()
get weight of the DMatrix
|
static int |
Rabit.getWorldSize()
get world size of current job.
|
static void |
Rabit.init(Map<String,String> envs)
Initialize the rabit library on current working thread.
|
Booster |
ExternalCheckpointManager.loadCheckpointAsBooster() |
static Booster |
XGBoost.loadModel(byte[] buffer)
Load a new Booster model from a byte array buffer.
|
static Booster |
XGBoost.loadModel(InputStream in)
Load a new Booster model from a file opened as input stream.
|
static Booster |
XGBoost.loadModel(String modelPath)
load model from modelPath
|
float[][] |
Booster.predict(DMatrix data)
Predict with data
|
float[][] |
Booster.predict(DMatrix data,
boolean outputMargin)
Predict with data
|
float[][] |
Booster.predict(DMatrix data,
boolean outputMargin,
int treeLimit)
Advanced predict function with all the options.
|
float[][] |
Booster.predictContrib(DMatrix data,
int treeLimit)
Output feature contributions toward predictions of given data
|
float[][] |
Booster.predictLeaf(DMatrix data,
int treeLimit)
Predict leaf indices given the data
|
long |
DMatrix.rowNum()
get the row number of DMatrix
|
void |
Booster.saveModel(OutputStream out)
Save the model to file opened as output stream.
|
void |
Booster.saveModel(String modelPath)
Save model to modelPath
|
void |
Booster.setAttr(String key,
String value)
Set attribute to the Booster.
|
void |
Booster.setAttrs(Map<String,String> attrs)
Set attributes to the Booster.
|
void |
DeviceQuantileDMatrix.setBaseMargin(Column column) |
void |
DMatrix.setBaseMargin(Column column)
Set base margin of DMatrix from cuda array interface
|
void |
DeviceQuantileDMatrix.setBaseMargin(float[] baseMargin) |
void |
DMatrix.setBaseMargin(float[] baseMargin)
Set base margin (initial prediction).
|
void |
DeviceQuantileDMatrix.setBaseMargin(float[][] baseMargin) |
void |
DMatrix.setBaseMargin(float[][] baseMargin)
Set base margin (initial prediction).
|
void |
DeviceQuantileDMatrix.setGroup(int[] group) |
void |
DMatrix.setGroup(int[] group)
Set group sizes of DMatrix (used for ranking)
|
void |
DeviceQuantileDMatrix.setLabel(Column column) |
void |
DMatrix.setLabel(Column column)
Set label of DMatrix from cuda array interface
|
void |
DeviceQuantileDMatrix.setLabel(float[] labels) |
void |
DMatrix.setLabel(float[] labels)
set label of dmatrix
|
void |
Booster.setParam(String key,
Object value)
Set parameter to the Booster.
|
void |
Booster.setParams(Map<String,Object> params)
Set parameters to the Booster.
|
void |
DeviceQuantileDMatrix.setWeight(Column column) |
void |
DMatrix.setWeight(Column column)
Set weight of DMatrix from cuda array interface
|
void |
DeviceQuantileDMatrix.setWeight(float[] weights) |
void |
DMatrix.setWeight(float[] weights)
set weight of each instance
|
static void |
Rabit.shutdown()
Shutdown the rabit engine in current working thread, equals to finalize.
|
DMatrix |
DMatrix.slice(int[] rowIndex)
Slice the DMatrix and return a new DMatrix that only contains `rowIndex`.
|
byte[] |
Booster.toByteArray() |
static void |
Rabit.trackerPrint(String msg)
Print the message on rabit tracker.
|
static Booster |
XGBoost.train(DMatrix dtrain,
Map<String,Object> params,
int round,
Map<String,DMatrix> watches,
float[][] metrics,
IObjective obj,
IEvaluation eval,
int earlyStoppingRound)
Train a booster given parameters.
|
static Booster |
XGBoost.train(DMatrix dtrain,
Map<String,Object> params,
int round,
Map<String,DMatrix> watches,
float[][] metrics,
IObjective obj,
IEvaluation eval,
int earlyStoppingRounds,
Booster booster)
Train a booster given parameters.
|
static Booster |
XGBoost.train(DMatrix dtrain,
Map<String,Object> params,
int round,
Map<String,DMatrix> watches,
IObjective obj,
IEvaluation eval)
Train a booster given parameters.
|
static Booster |
XGBoost.trainAndSaveCheckpoint(DMatrix dtrain,
Map<String,Object> params,
int numRounds,
Map<String,DMatrix> watches,
float[][] metrics,
IObjective obj,
IEvaluation eval,
int earlyStoppingRounds,
Booster booster,
int checkpointInterval,
String checkpointPath,
org.apache.hadoop.fs.FileSystem fs) |
void |
Booster.update(DMatrix dtrain,
int iter)
Update the booster for one iteration.
|
void |
Booster.update(DMatrix dtrain,
IObjective obj)
Update with customize obj func
|
void |
ExternalCheckpointManager.updateCheckpoint(Booster boosterToCheckpoint) |
static int |
Rabit.versionNumber()
Get version number of current stored model in the thread.
|
Constructor and Description |
---|
DeviceQuantileDMatrix(Iterator<ColumnBatch> iter,
float missing,
int maxBin,
int nthread)
Create DeviceQuantileDMatrix from iterator based on the cuda array interface
|
DMatrix(BigDenseMatrix matrix)
create DMatrix from a BigDenseMatrix
|
DMatrix(BigDenseMatrix matrix,
float missing)
create DMatrix from dense matrix
|
DMatrix(ColumnBatch columnBatch,
float missing,
int nthread)
Create the normal DMatrix from column array interface
|
DMatrix(float[] data,
int nrow,
int ncol)
Deprecated.
Please specify the missing value explicitly using
DMatrix(float[], int, int, float) |
DMatrix(float[] data,
int nrow,
int ncol,
float missing)
create DMatrix from dense matrix
|
DMatrix(Iterator<LabeledPoint> iter,
String cacheInfo)
Create DMatrix from iterator.
|
DMatrix(long[] headers,
int[] indices,
float[] data,
DMatrix.SparseType st)
Deprecated.
|
DMatrix(long[] headers,
int[] indices,
float[] data,
DMatrix.SparseType st,
int shapeParam)
Create DMatrix from Sparse matrix in CSR/CSC format.
|
DMatrix(String dataPath)
Create DMatrix by loading libsvm file from dataPath
|
ExternalCheckpointManager(String checkpointPath,
org.apache.hadoop.fs.FileSystem fs) |
RabitTracker(int numWorkers) |
Copyright © 2021. All rights reserved.