1. Zoltán Szabó
  2. ITE


ITE / code / IPA / demos / estimate_mAR_IPA.m

function [s_hat,e_hat,W_hat,de_hat,Fx_hat,Fs_hat] = estimate_mAR_IPA(x,ARmethod_parameters,ICA_method,opt_type,cost_type,cost_name,unknown_dimensions,de)
%Estimates the mAR-IPA model. Method: mAR identification + ISA on the estimated innovation.
%   x: x(:,t) is the observation at time t.
%   ARmethod_parameters:
%      ARmethod_parameters.method: AR estimation method. Possibilities: 'NIW', 'subspace', 'subspace-LL', 'LL'.
%   ICA_method: the name of the ICA method applied, see 'estimate_ICA.m'.
%   cost_type, cost_name, opt_type: cost type, cost name, optimization  type. Example: cost_type = 'sumH', cost_name = 'Renyi_kNN_1tok', opt_type = 'greedy' means that we use an entropy sum ISA formulation ('sumH'), where the entropies are estimated Renyi entropies via kNN methods ('Renyi_kNN_1tok') and the optimization is greedy; see also 'demo_ISA.m'
%   unknown_dimensions: '0' means 'the subspace dimensions are known'; '1' means 'the number of the subspaces are known' (but the individual dimensions are unknown).
%   de: 
%       1)in case of 'unknown_dimensions = 0': 'de' contains the subspace dimensions.
%       2)in case of 'unknown_dimensions = 1': the length of 'de' must be equal to the number of subspaces, but the coordinates of the vector can be arbitrary.
%   s_hat: estimated source, s_hat(:,t) corresponds to time t
%   e_hat: estimated driving noise, e_hat(:,t) corresponds to time t
%   W_hat: estimated demixing matrix.
%   de_hat: estimated subspace dimensions.
%   Fx_hat: estimated observation dynamics.
%   Fs_hat: estimated source dynamics.
%  Zoltan Szabo. Autoregressive Independent Process Analysis with Missing Observations. European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN), pp. 159-164, 2010.
%Copyright (C) 2012 Zoltan Szabo ("http://nipg.inf.elte.hu/szzoli", "szzoli (at) cs (dot) elte (dot) hu")
%This file is part of the ITE (Information Theoretical Estimators) Matlab/Octave toolbox.
%ITE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
%the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
%This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
%You should have received a copy of the GNU General Public License along with ITE. If not, see <http://www.gnu.org/licenses/>.

%mAR fit to x:
   [x_innovation_hat,Fx_hat,SBCs] = estimate_mAR(x,ARmethod_parameters);
%ISA on the estimated innovation of x:
   [e_hat,W_hat,de_hat] = estimate_ISA(x_innovation_hat,ICA_method,opt_type,cost_type,cost_name,unknown_dimensions,de,size(x_innovation_hat,1));
%estimated source(s_hat) and its dynamics:
   s_hat = W_hat * x;
   Fs_hat = basis_transformation_AR(Fx_hat,W_hat,inv(W_hat));