Implement Random Forest nodes/leaves/depth

This commit is contained in:
2023-11-28 00:35:38 +01:00
parent 4addaefb47
commit d06bf187b2
6 changed files with 60 additions and 1 deletions

View File

@@ -5,4 +5,16 @@ namespace pywrap {
{
validHyperparameters = { "n_estimators", "n_jobs", "random_state" };
}
int RandomForest::getNumberOfEdges() const
{
return callMethodSumOfItems("get_n_leaves");
}
int RandomForest::getNumberOfStates() const
{
return callMethodSumOfItems("get_depth");
}
int RandomForest::getNumberOfNodes() const
{
return callMethodSumOfItems("node_count");
}
} /* namespace pywrap */