mirror of
https://github.com/Relintai/pmlpp.git
synced 2024-12-22 15:06:47 +01:00
43 lines
713 B
C++
43 lines
713 B
C++
|
|
#ifndef MLPP_PCA_H
|
|
#define MLPP_PCA_H
|
|
|
|
|
|
#include "core/math/math_defs.h"
|
|
|
|
#include "core/object/reference.h"
|
|
|
|
#include "../lin_alg/mlpp_matrix.h"
|
|
#include "../lin_alg/mlpp_vector.h"
|
|
|
|
class MLPPPCA : public Reference {
|
|
GDCLASS(MLPPPCA, Reference);
|
|
|
|
public:
|
|
Ref<MLPPMatrix> get_input_set();
|
|
void set_input_set(const Ref<MLPPMatrix> &val);
|
|
|
|
int get_k();
|
|
void set_k(const int val);
|
|
|
|
Ref<MLPPMatrix> principal_components();
|
|
real_t score();
|
|
|
|
MLPPPCA(const Ref<MLPPMatrix> &p_input_set, int p_k);
|
|
|
|
MLPPPCA();
|
|
~MLPPPCA();
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
Ref<MLPPMatrix> _input_set;
|
|
int _k;
|
|
|
|
Ref<MLPPMatrix> _x_normalized;
|
|
Ref<MLPPMatrix> _u_reduce;
|
|
Ref<MLPPMatrix> _z;
|
|
};
|
|
|
|
#endif /* PCA_hpp */
|