From 69bc0f6f2663bf3ef6180054aed6c180a8104249 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 12 Feb 2023 17:38:05 +0100 Subject: [PATCH] Registered MLPPDualSVC to the ClassDB. --- mlpp/dual_svc/dual_svc.cpp | 3 +++ mlpp/dual_svc/dual_svc.h | 10 ++++++++-- register_types.cpp | 30 ++++++++++++++++-------------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/mlpp/dual_svc/dual_svc.cpp b/mlpp/dual_svc/dual_svc.cpp index 25dd006..34a091f 100644 --- a/mlpp/dual_svc/dual_svc.cpp +++ b/mlpp/dual_svc/dual_svc.cpp @@ -254,3 +254,6 @@ std::vector> MLPPDualSVC::kernel_functionm(std::vector>(); } + +void MLPPDualSVC::_bind_methods() { +} diff --git a/mlpp/dual_svc/dual_svc.h b/mlpp/dual_svc/dual_svc.h index 80a81eb..02ea5e8 100644 --- a/mlpp/dual_svc/dual_svc.h +++ b/mlpp/dual_svc/dual_svc.h @@ -13,10 +13,14 @@ #include "core/math/math_defs.h" +#include "core/object/reference.h" + #include #include -class MLPPDualSVC { +class MLPPDualSVC : public Reference { + GDCLASS(MLPPDualSVC, Reference); + public: std::vector model_set_test(std::vector> X); real_t model_test(std::vector x); @@ -33,7 +37,7 @@ public: MLPPDualSVC(); ~MLPPDualSVC(); -private: +protected: void init(); real_t cost(std::vector alpha, std::vector> X, std::vector y); @@ -51,6 +55,8 @@ private: real_t kernel_functionv(std::vector v, std::vector u, std::string kernel); std::vector> kernel_functionm(std::vector> U, std::vector> V, std::string kernel); + static void _bind_methods(); + std::vector> _input_set; std::vector _output_set; std::vector _z; diff --git a/register_types.cpp b/register_types.cpp index 44f9e83..63f9f52 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -29,38 +29,39 @@ SOFTWARE. #include "mlpp/activation/activation.h" #include "mlpp/cost/cost.h" +#include "mlpp/gauss_markov_checker/gauss_markov_checker.h" +#include "mlpp/hypothesis_testing/hypothesis_testing.h" +#include "mlpp/numerical_analysis/numerical_analysis.h" #include "mlpp/regularization/reg.h" +#include "mlpp/stat/stat.h" #include "mlpp/transforms/transforms.h" #include "mlpp/utilities/utilities.h" -#include "mlpp/stat/stat.h" -#include "mlpp/numerical_analysis/numerical_analysis.h" -#include "mlpp/hypothesis_testing/hypothesis_testing.h" -#include "mlpp/gauss_markov_checker/gauss_markov_checker.h" #include "mlpp/hidden_layer/hidden_layer.h" #include "mlpp/multi_output_layer/multi_output_layer.h" #include "mlpp/output_layer/output_layer.h" #include "mlpp/auto_encoder/auto_encoder.h" +#include "mlpp/exp_reg/exp_reg.h" +#include "mlpp/gan/gan.h" +#include "mlpp/gaussian_nb/gaussian_nb.h" #include "mlpp/kmeans/kmeans.h" #include "mlpp/knn/knn.h" +#include "mlpp/lin_reg/lin_reg.h" +#include "mlpp/log_reg/log_reg.h" +#include "mlpp/mann/mann.h" +#include "mlpp/mlp/mlp.h" +#include "mlpp/multinomial_nb/multinomial_nb.h" #include "mlpp/outlier_finder/outlier_finder.h" #include "mlpp/pca/pca.h" #include "mlpp/probit_reg/probit_reg.h" +#include "mlpp/softmax_net/softmax_net.h" #include "mlpp/softmax_reg/softmax_reg.h" #include "mlpp/svc/svc.h" +#include "mlpp/tanh_reg/tanh_reg.h" #include "mlpp/uni_lin_reg/uni_lin_reg.h" #include "mlpp/wgan/wgan.h" -#include "mlpp/tanh_reg/tanh_reg.h" -#include "mlpp/softmax_net/softmax_net.h" -#include "mlpp/mlp/mlp.h" -#include "mlpp/multinomial_nb/multinomial_nb.h" -#include "mlpp/mann/mann.h" -#include "mlpp/log_reg/log_reg.h" -#include "mlpp/lin_reg/lin_reg.h" -#include "mlpp/gaussian_nb/gaussian_nb.h" -#include "mlpp/gan/gan.h" -#include "mlpp/exp_reg/exp_reg.h" +#include "mlpp/dual_svc/dual_svc.h" #include "test/mlpp_tests.h" @@ -104,6 +105,7 @@ void register_pmlpp_types(ModuleRegistrationLevel p_level) { ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class();