Add nodes/leaves/depth to STree & ODTE

This commit is contained in:
2023-11-27 10:57:57 +01:00
parent 4fefe9a1d2
commit 82964190f6
8 changed files with 53 additions and 2 deletions

View File

@@ -5,6 +5,18 @@ namespace pywrap {
{
validHyperparameters = { "n_jobs", "n_estimators", "random_state" };
}
int ODTE::getNumberOfNodes() const
{
return callMethodInt("get_nodes");
}
int ODTE::getNumberOfEdges() const
{
return callMethodInt("get_leaves");
}
int ODTE::getNumberOfStates() const
{
return callMethodInt("get_depth");
}
std::string ODTE::graph()
{
return callMethodString("graph");