Add XGBoost Classifier

This commit is contained in:
2024-01-16 17:06:00 +01:00
parent f46f6dcbb2
commit 071f7167e6
3 changed files with 17 additions and 10 deletions

View File

@@ -1,16 +1,11 @@
#include "XGBoost.h"
//See https ://stackoverflow.com/questions/36071672/using-xgboost-in-c
namespace pywrap {
XGBoost::XGBoost() : PyClassifier("xgboost", "XGBClassifier")
{
validHyperparameters = { "tree_method", "early_stopping_rounds", "n_jobs" };
}
std::string XGBoost::version()
{
return callMethodString("1.0");

View File

@@ -5,7 +5,7 @@
namespace pywrap {
class XGBoost : public PyClassifier {
public:
XGBoost() : PyClassifier("xgboost", "XGBClassifier") {};
XGBoost();
~XGBoost() = default;
std::string version();
};