Implement hyperparameters

This commit is contained in:
2023-11-08 10:35:38 +01:00
parent 1f46fc6c24
commit 331381930a
17 changed files with 913 additions and 325 deletions

View File

@@ -5,4 +5,11 @@ namespace pywrap {
{
return callMethodString("graph");
}
void STree::setHyperparameters(const nlohmann::json& hyperparameters)
{
// Check if hyperparameters are valid
const std::vector<std::string> validKeys = { "C", "n_jobs", "kernel", "max_iter", "max_depth", "random_state", "multiclass_strategy" };
checkHyperparameters(validKeys, hyperparameters);
this->hyperparameters = hyperparameters;
}
} /* namespace pywrap */