Package biz.k11i.xgboost.tree
Class RegTree
- java.lang.Object
-
- biz.k11i.xgboost.tree.RegTree
-
- All Implemented Interfaces:
Serializable
public class RegTree extends Object implements Serializable
Regression tree.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RegTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLeafIndex(FVec feat, int root_id)
Retrieves nodes from root to leaf and returns leaf index.float
getLeafValue(FVec feat, int root_id)
Retrieves nodes from root to leaf and returns leaf value.void
loadModel(ModelReader reader)
Loads model from stream.
-
-
-
Method Detail
-
loadModel
public void loadModel(ModelReader reader) throws IOException
Loads model from stream.- Parameters:
reader
- input stream- Throws:
IOException
- If an I/O error occurs
-
getLeafIndex
public int getLeafIndex(FVec feat, int root_id)
Retrieves nodes from root to leaf and returns leaf index.- Parameters:
feat
- feature vectorroot_id
- starting root index- Returns:
- leaf index
-
getLeafValue
public float getLeafValue(FVec feat, int root_id)
Retrieves nodes from root to leaf and returns leaf value.- Parameters:
feat
- feature vectorroot_id
- starting root index- Returns:
- leaf value
-
-