Add Pywrap sources

This commit is contained in:
2023-11-12 21:43:07 +01:00
parent f9258e43b9
commit f6e00530be
18 changed files with 642 additions and 9 deletions

15
src/PyClassifiers/SVC.cc Normal file
View File

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