Refactor version method in PyClassifier

This commit is contained in:
2023-11-13 13:59:06 +01:00
parent 431b3a3aa5
commit 69ad660040
7 changed files with 14 additions and 18 deletions

View File

@@ -1,8 +1,11 @@
#include "RandomForest.h"
namespace pywrap {
std::string RandomForest::version()
void RandomForest::setHyperparameters(nlohmann::json& hyperparameters)
{
return sklearnVersion();
// Check if hyperparameters are valid
const std::vector<std::string> validKeys = { "n_estimators", "n_jobs", "random_state" };
checkHyperparameters(validKeys, hyperparameters);
this->hyperparameters = hyperparameters;
}
} /* namespace pywrap */