public class GBLinear
extends java.lang.Object
GradBooster.Factory| Modifier and Type | Field and Description |
|---|---|
protected int |
num_class |
| Modifier and Type | Method and Description |
|---|---|
void |
loadModel(PredictorConfiguration config,
ModelReader reader,
boolean ignored_with_pbuffer)
Loads model from stream.
|
float[] |
predict(FVec feat,
int ntree_limit)
Generates predictions for given feature vector.
|
int[] |
predictLeaf(FVec feat,
int ntree_limit)
Predicts the leaf index of each tree.
|
float |
predictSingle(FVec feat,
int ntree_limit)
Generates a prediction for given feature vector.
|
void |
setNumClass(int num_class) |
public void loadModel(PredictorConfiguration config, ModelReader reader, boolean ignored_with_pbuffer) throws java.io.IOException
GradBoosterreader - input streamignored_with_pbuffer - whether the incoming data contains pbufferjava.io.IOException - If an I/O error occurspublic float[] predict(FVec feat, int ntree_limit)
GradBoosterfeat - feature vectorntree_limit - limit the number of trees used in predictionpublic float predictSingle(FVec feat, int ntree_limit)
GradBoosterThis method only works when the model outputs single value.
feat - feature vectorntree_limit - limit the number of trees used in predictionpublic int[] predictLeaf(FVec feat, int ntree_limit)
GradBoosterfeat - feature vectorntree_limit - limit the number of trees used in predictionpublic void setNumClass(int num_class)
setNumClass in interface GradBooster