forked from BiteenMatlab/NOBIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNOBIAS_init.m
31 lines (21 loc) · 856 Bytes
/
NOBIAS_init.m
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
function [theta, Suff_Stat , stateCounts , hyperparams , prior_params] = NOBIAS_init(Params)
Nmax = Params.Nmax;
dimu=Params.dim;
%parameters
theta = struct('Sigma',zeros(dimu,dimu,Nmax),'mu',zeros(dimu,Nmax),'invSigma',zeros(dimu,dimu,Nmax));
% sufficient statistics
Suff_Stat = struct('card',zeros(Nmax,1),'YYt',zeros(dimu,dimu,Nmax),'sumY',zeros(dimu,Nmax));
% set up structure of the state count
stateCounts.N = zeros(Nmax+1,Nmax);
stateCounts.M = zeros(Nmax+1,Nmax);
stateCounts.barM = zeros(Nmax+1,Nmax);
stateCounts.sum_w = zeros(1,Nmax);
% Resample concentration parameters:
hyperparams.gamma0 = Params.gamma;
hyperparams.alpha0 = Params.alpha;
hyperparams.kappa0 = Params.kappa;
prior_params.M = Params.M;
prior_params.K = Params.K;
prior_params.nu = Params.nu;
prior_params.nu_delta= Params.nu_delta;
end