#ifndef MLPP_PCA_H #define MLPP_PCA_H // // PCA.hpp // // Created by Marc Melikyan on 10/2/20. // #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 get_input_set(); void set_input_set(const Ref &val); int get_k(); void set_k(const int val); Ref principal_components(); real_t score(); MLPPPCA(const Ref &p_input_set, int p_k); MLPPPCA(); ~MLPPPCA(); protected: static void _bind_methods(); Ref _input_set; int _k; Ref _x_normalized; Ref _u_reduce; Ref _z; }; #endif /* PCA_hpp */