| Modifier and Type | Interface and Description |
|---|---|
static class |
GradBooster.Factory |
| Modifier and Type | Method and Description |
|---|---|
void |
loadModel(PredictorConfiguration config,
ModelReader reader,
boolean with_pbuffer)
Loads model from stream.
|
float[] |
predict(FVec feat,
int ntree_limit,
float base_score)
Generates predictions for given feature vector.
|
int[] |
predictLeaf(FVec feat,
int ntree_limit)
Predicts the leaf index of each tree.
|
java.lang.String[] |
predictLeafPath(FVec feat,
int ntree_limit)
Predicts the path to leaf of each tree.
|
float |
predictSingle(FVec feat,
int ntree_limit,
float base_score)
Generates a prediction for given feature vector.
|
void |
setNumClass(int numClass) |
void |
setNumFeature(int numFeature) |
void setNumClass(int numClass)
void setNumFeature(int numFeature)
void loadModel(PredictorConfiguration config, ModelReader reader, boolean with_pbuffer) throws java.io.IOException
config - predictor configurationreader - input streamwith_pbuffer - whether the incoming data contains pbufferjava.io.IOException - If an I/O error occursfloat[] predict(FVec feat, int ntree_limit, float base_score)
feat - feature vectorntree_limit - limit the number of trees used in predictionbase_score - base score to initialize predictionfloat predictSingle(FVec feat, int ntree_limit, float base_score)
This method only works when the model outputs single value.
feat - feature vectorntree_limit - limit the number of trees used in predictionbase_score - base score to initialize predictionint[] predictLeaf(FVec feat, int ntree_limit)
feat - feature vectorntree_limit - limit the number of trees used in predictionjava.lang.String[] predictLeafPath(FVec feat, int ntree_limit)
feat - feature vectorntree_limit - limit the number of trees used in prediction