Refactor library structure

This commit is contained in:
2024-03-08 22:20:38 +01:00
parent 5bec9d4d2f
commit 7534cba7e6
23 changed files with 22 additions and 152 deletions

20
pyclfs/RandomForest.cc Normal file
View File

@@ -0,0 +1,20 @@
#include "RandomForest.h"
namespace pywrap {
RandomForest::RandomForest() : PyClassifier("sklearn.ensemble", "RandomForestClassifier", true)
{
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 */