⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ifa.h

📁 变分独立因子分析C++代码,H.Attias说比独立分量分析要好,但是这个程序分析效果不好,可能是程序问题,也可能是对理论理解不透
💻 H
字号:
// W.h: interface for the W class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IFA_H__E961FAD3_1017_400C_9511_DB28A8257B50__INCLUDED_)
#define AFX_IFA_H__E961FAD3_1017_400C_9511_DB28A8257B50__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "matrix.h"
#include <valarray>
using namespace std;

#define pi (4*atan(1))
#define twopi  (2*pi)
class W  
{
	int Lp;
	int L;
	int maxni;
	int totalni;
	int* n;
	CMatrix H;
	CMatrix lambda;
	CMatrix mu;
	CMatrix nu;
	CMatrix omega;
public:
	friend CMatrix rhoqy(const W & w, const valarray<int> & q, const CMatrix & y,  CMatrix & sigmaq);//const
	friend CMatrix sigmaq(const W & w, const valarray<int> & q);

	friend double pq_y(const W & w, const valarray<int> & q, const CMatrix & y, const double py); 
	friend double pq(const W & w, const valarray<int> & q);
	friend double py_q(const W & w, const CMatrix & y, const valarray<int> & q);
	friend double py(const W & w, const CMatrix & y);

	friend double Gauss(const CMatrix & x, const CMatrix & mu, const CMatrix & sigmma);
	friend CMatrix Attias(const valarray<int> & N, const CMatrix & Vq, const CMatrix &H, \
		                  const CMatrix & lambda, const CMatrix & y, const CMatrix & muq);

	void initialize(int l, int lp, int* ni);
	W();
	virtual ~W();

};


#endif // !defined(AFX_IFA_H__E961FAD3_1017_400C_9511_DB28A8257B50__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -