mirror of
https://github.com/Relintai/pmlpp.git
synced 2024-11-09 13:22:09 +01:00
30 lines
498 B
C++
30 lines
498 B
C++
|
|
#ifndef MLPP_PCA_H
|
|
#define MLPP_PCA_H
|
|
|
|
//
|
|
// PCA.hpp
|
|
//
|
|
// Created by Marc Melikyan on 10/2/20.
|
|
//
|
|
|
|
#include <vector>
|
|
|
|
|
|
class MLPPPCA {
|
|
public:
|
|
MLPPPCA(std::vector<std::vector<double>> inputSet, int k);
|
|
std::vector<std::vector<double>> principalComponents();
|
|
double score();
|
|
|
|
private:
|
|
std::vector<std::vector<double>> inputSet;
|
|
std::vector<std::vector<double>> X_normalized;
|
|
std::vector<std::vector<double>> U_reduce;
|
|
std::vector<std::vector<double>> Z;
|
|
int k;
|
|
};
|
|
|
|
|
|
#endif /* PCA_hpp */
|