Add Pywrap sources
This commit is contained in:
15
src/PyClassifiers/SVC.cc
Normal file
15
src/PyClassifiers/SVC.cc
Normal 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 */
|
Reference in New Issue
Block a user