-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathICA.h
More file actions
37 lines (31 loc) · 692 Bytes
/
ICA.h
File metadata and controls
37 lines (31 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include <cstdlib>
#ifdef _MSC_VER
#pragma warning( disable: 4365 4626 4640 4714 )
#endif
#include "Eigen/Core"
#include "Eigen/LU"
#include "Eigen/Eigenvalues"
#ifdef _MSC_VER
#pragma warning( default: 4365 4626 4640 )
#endif
using namespace std;
using namespace Eigen;
class ICA
{
private:
int n_filter, // number of filters
n_pixel; // image patch size
MatrixXd weight;
public:
ICA(int n_u, int n_x);
~ICA();
MatrixXd &Filter();
void Learn(MatrixXd &data, double rate);
void Whitening(MatrixXd &X);
private:
//ICA(ICA&);
//ICA& operator =(const ICA&);
void Covariance(const MatrixXd &A, MatrixXd &C);
void MatrixSqrt(const MatrixXd &A, MatrixXd &S);
};