CS_CO_ObsModelPURPOSECS_CO_ObsModel constructor.
SYNOPSISfunction OM=CS_CO_ObsModel(varargin)
DESCRIPTIONCS_CO_ObsModel constructor. Defines an observation model (p(o|s)) on continuous state and observation spaces. This kind of observation models are defined via kernel smoothing (see Section 6.2, pag 22 of the paper) The CS_CO_ObsModel defines p(o,s) via Kernel smoothing: using a double Gaussian on 's' and on 'o'. From here: p(o|s)=p(o,s)/p(s) Where we assume p(s) as uniform. For simplicity the 1/p(s) scale factor is integrated into the kernel weight. Parameters S: Continuous state space. O: Continuous observation space. w: weights of the double mixture. gS: Gaussians in 's'. gO: Gaussians in 'o'. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function OM=CS_CO_ObsModel(varargin) 0002 % CS_CO_ObsModel constructor. 0003 % 0004 % Defines an observation model (p(o|s)) on continuous state and 0005 % observation spaces. 0006 % This kind of observation models are defined via kernel smoothing (see 0007 % Section 6.2, pag 22 of the paper) 0008 % 0009 % The CS_CO_ObsModel defines p(o,s) via Kernel smoothing: using a double 0010 % Gaussian on 's' and on 'o'. From here: 0011 % p(o|s)=p(o,s)/p(s) 0012 % Where we assume p(s) as uniform. 0013 % For simplicity the 1/p(s) scale factor is integrated into the kernel 0014 % weight. 0015 % 0016 % Parameters 0017 % S: Continuous state space. 0018 % O: Continuous observation space. 0019 % w: weights of the double mixture. 0020 % gS: Gaussians in 's'. 0021 % gO: Gaussians in 'o'. 0022 0023 switch nargin 0024 case 1 0025 if isa(varargin{1},'CS_CO_ObsModel') 0026 OM=varargin{1}; 0027 else 0028 error('Wrong parameter type in CS_CO_ObsModel constructor'); 0029 end 0030 case 5 0031 if isa(varargin{1},'CSpace') 0032 OM.S=varargin{1}; 0033 else 0034 error('Wrong parameter type in CS_CO_ObsModel constructor'); 0035 end 0036 if isa(varargin{2},'CSpace') 0037 OM.O=varargin{2}; 0038 else 0039 error('Wrong parameter type in CS_CO_ObsModel constructor'); 0040 end 0041 if isa(varargin{3},'double') 0042 OM.w=varargin{3}*(1/UniformProbability(OM.S)); 0043 end 0044 if isa(varargin{4},'cell') 0045 OM.gS=varargin{4}; 0046 end 0047 if isa(varargin{5},'cell') 0048 OM.gO=varargin{5}; 0049 end 0050 0051 % Scale factor to apply = What it should be (UniformProbability(OM.S)) 0052 % vs. what actually is (Value(o,Center(OM.S))) 0053 % We estimate p(s) via sampling (small variations can occur) 0054 gS=GMixture(OM.w,OM.gS); % p(s)=int_o p(o,s) 0055 ps=0; 0056 % draw 10 sample on 's' to estimate p(s). 0057 for i=1:10 0058 ps=ps+Value(gS,rand(OM.S)); 0059 end 0060 ps=ps/10; 0061 scale=UniformProbability(OM.S)/ps; 0062 OM.w=OM.w*scale; 0063 0064 OMBase=ObsModel(); 0065 0066 OM=class(OM,'CS_CO_ObsModel',OMBase); 0067 otherwise 0068 error('Wrong number of parameters in CS_CO_ObsdModel constructor'); 0069 end 0070 |