Package biz.k11i.xgboost.tree
Class RegTreeImpl
java.lang.Object
biz.k11i.xgboost.tree.RegTreeImpl
- All Implemented Interfaces:
RegTree,Serializable
Regression tree.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static classParameters. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RegTreeImpl.Node[]private RegTreeImpl.Paramprivate RegTreeNodeStat[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetLeafIndex(FVec feat) Retrieves nodes from root to leaf and returns leaf index.voidgetLeafPath(FVec feat, StringBuilder sb) Retrieves nodes from root to leaf and returns path to leaf.floatgetLeafValue(FVec feat, int root_id) Retrieves nodes from root to leaf and returns leaf value.getNodes()getStats()voidloadModel(ModelReader reader) Loads model from stream.
-
Field Details
-
param
-
nodes
-
stats
-
-
Constructor Details
-
RegTreeImpl
public RegTreeImpl()
-
-
Method Details
-
loadModel
Loads model from stream.- Parameters:
reader- input stream- Throws:
IOException- If an I/O error occurs
-
getLeafIndex
Retrieves nodes from root to leaf and returns leaf index.- Specified by:
getLeafIndexin interfaceRegTree- Parameters:
feat- feature vector- Returns:
- leaf index
-
getLeafPath
Retrieves nodes from root to leaf and returns path to leaf.- Specified by:
getLeafPathin interfaceRegTree- Parameters:
feat- feature vectorsb- output param, will write path path to leaf into this buffer
-
getLeafValue
Retrieves nodes from root to leaf and returns leaf value.- Specified by:
getLeafValuein interfaceRegTree- Parameters:
feat- feature vectorroot_id- starting root index- Returns:
- leaf value
-
getNodes
-
getStats
-