Register MLPPStat into the ClassDB.

This commit is contained in:
Relintai 2023-02-12 15:47:48 +01:00
parent 5316c4fbb0
commit 235ba86eae
3 changed files with 13 additions and 1 deletions

View File

@ -270,3 +270,6 @@ real_t MLPPStat::logMean(const real_t x, const real_t y) {
}
return (y - x) / (log(y) - std::log(x));
}
void MLPPStat::_bind_methods() {
}

View File

@ -10,12 +10,16 @@
#include "core/math/math_defs.h"
#include "core/object/reference.h"
#include "../lin_alg/mlpp_matrix.h"
#include "../lin_alg/mlpp_vector.h"
#include <vector>
class MLPPStat {
class MLPPStat : public Reference {
GDCLASS(MLPPStat, Reference);
public:
// These functions are for univariate lin reg module- not for users.
real_t b0Estimation(const std::vector<real_t> &x, const std::vector<real_t> &y);
@ -58,6 +62,9 @@ public:
real_t stolarskyMean(const real_t x, const real_t y, const real_t p);
real_t identricMean(const real_t x, const real_t y);
real_t logMean(const real_t x, const real_t y);
protected:
static void _bind_methods();
};
#endif /* Stat_hpp */

View File

@ -32,6 +32,7 @@ SOFTWARE.
#include "mlpp/regularization/reg.h"
#include "mlpp/transforms/transforms.h"
#include "mlpp/utilities/utilities.h"
#include "mlpp/stat/stat.h"
#include "mlpp/hidden_layer/hidden_layer.h"
#include "mlpp/multi_output_layer/multi_output_layer.h"
@ -63,6 +64,7 @@ void register_pmlpp_types(ModuleRegistrationLevel p_level) {
ClassDB::register_class<MLPPActivation>();
ClassDB::register_class<MLPPCost>();
ClassDB::register_class<MLPPTransforms>();
ClassDB::register_class<MLPPStat>();
ClassDB::register_class<MLPPHiddenLayer>();
ClassDB::register_class<MLPPOutputLayer>();