Uses of Class
ml.dmlc.xgboost4j.java.XGBoostError
-
Uses of XGBoostError in ml.dmlc.xgboost4j.java
Methods in ml.dmlc.xgboost4j.java that throw XGBoostErrorModifier and TypeMethodDescriptionvoid
update with give grad and hessprivate static void
Rabit.checkCall
(int ret) (package private) static void
XGBoostJNI.checkCall
(int ret) Check the return code of the JNI call.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.XGBoost.CVPack.eval
(int iter) evaluationXGBoost.CVPack.eval
(IEvaluation eval) evaluationevaluate with given dmatrixs.evaluate with given dmatrixs.Booster.evalSet
(DMatrix[] evalMatrixs, String[] evalNames, IEvaluation eval) evaluate with given customized Evaluation classBooster.evalSet
(DMatrix[] evalMatrixs, String[] evalNames, IEvaluation eval, float[] metricsOut) final String
Get attribute from the Booster.Booster.getAttrs()
Get attributes stored in the Booster as a Map.float[]
DMatrix.getBaseMargin()
Get base margin of the DMatrix.private String[]
Booster.getDumpInfo
(boolean withStats) Save the model as byte array representation.Booster.getFeatureImportanceFromModel
(String[] modelInfos, String importanceType) Get the importance of each feature based on information gain or coverBooster.getFeatureScore
(String featureMap) Get importance of each featureBooster.getFeatureScore
(String[] featureNames) Get importance of each feature with specified feature names.Booster.getFeatureWeightsFromModel
(String[] modelInfos) Get the importance of each feature based purely on weights (number of splits)private float[]
DMatrix.getFloatInfo
(String field) private int[]
DMatrix.getIntInfo
(String field) float[]
DMatrix.getLabel()
get label valuesString[]
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 arrayString[]
Booster.getModelDump
(String featureMap, boolean withStats, String format) static int
Rabit.getRank()
get rank of current thread.Get the feature importances for gain or cover (average or total)Get the feature importances for gain or cover (average or total), with feature namesfloat[]
DMatrix.getWeight()
get weight of the DMatrixstatic int
Rabit.getWorldSize()
get world size of current job.private void
Internal initialization function.static void
Initialize the rabit library on current working thread.(package private) static Booster
Booster.loadModel
(InputStream in) Load a new Booster model from a file opened as input stream.(package private) static Booster
Load a new Booster model from modelPathstatic Booster
XGBoost.loadModel
(InputStream in) Load a new Booster model from a file opened as input stream.static Booster
load model from modelPath(package private) int
Booster.loadRabitCheckpoint()
Load the booster model from thread-local rabit checkpoint.private static XGBoost.CVPack[]
make an n-fold array of CVPack from random indicesfloat[][]
Predict with datafloat[][]
Predict with datafloat[][]
Advanced predict function with all the options.private float[][]
Booster.predict
(DMatrix data, boolean outputMargin, int treeLimit, boolean predLeaf, boolean predContribs) Advanced predict function with all the options.float[][]
Booster.predictContrib
(DMatrix data, int treeLimit) Output feature contributions toward predictions of given datafloat[][]
Booster.predictLeaf
(DMatrix data, int treeLimit) Predict leaf indices given the datalong
DMatrix.rowNum()
get the row number of DMatrixvoid
Booster.saveModel
(OutputStream out) Save the model to file opened as output stream.void
Save model to modelPath(package private) void
Booster.saveRabitCheckpoint()
Save the booster model into thread-local rabit checkpoint and increment the version.final void
Set attribute to the Booster.void
Set attributes to the Booster.void
DMatrix.setBaseMargin
(float[] baseMargin) Set base margin (initial prediction).void
DMatrix.setBaseMargin
(float[][] baseMargin) Set base margin (initial prediction).void
DMatrix.setGroup
(int[] group) Set group sizes of DMatrix (used for ranking)void
DMatrix.setLabel
(float[] labels) set label of dmatrixfinal void
Set parameter to the Booster.void
Set parameters to the Booster.void
DMatrix.setWeight
(float[] weights) set weight of each instancestatic void
Rabit.shutdown()
Shutdown the rabit engine in current working thread, equals to finalize.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.void
Update the booster for one iteration.void
Booster.update
(DMatrix dtrain, IObjective obj) Update with customize obj funcvoid
XGBoost.CVPack.update
(int iter) update one iterationvoid
XGBoost.CVPack.update
(IObjective obj) update one iterationstatic int
Rabit.versionNumber()
Get version number of current stored model in the thread.Constructors in ml.dmlc.xgboost4j.java that throw XGBoostErrorModifierConstructorDescription(package private)
Create a new Booster with empty stage.create an cross validation packageDMatrix
(float[] data, int nrow, int ncol) create DMatrix from dense matrixDMatrix
(float[] data, int nrow, int ncol, float missing) create DMatrix from dense matrixDMatrix
(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.Create DMatrix by loading libsvm file from dataPathCreate DMatrix from iterator.RabitTracker
(int numWorkers)