Download Probabilistic Data Mapping: Soft Data and Coding in BMEGUI and BMElib - Prof. Marc L. Serr and more Study notes Environmental Science in PDF only on Docsity!
Space/Time mapping with Soft data
Soft Data
X( p )=X( s ,t) is a S/TRF.
Soft data for X( p ) is available at the soft data points p soft = ( p 1 ,…, p ns ).
The vector of random variables x soft = ( x 1 ,…, xns ) represents the S/TRF at the soft data point, i.e.
x soft=( X( p 1 ),…, X( p ns ))
Soft data of probabilistic type are expressed using the pdf fS ( soft) as follow
S : soft I , P [ x soft< soft] =
χ (^) soft (^) u ( u )
d fS = FS ( soft)
Usually the pdf of soft data points are independent of one another so that fS ( soft) = fS ( 1 )… fS ( ns).
In general the pdf each individual soft datum fS ( 1 ), …, fS ( ns) can have various shapes
3
f
S
3
f
S
2
f
S
4
4
f
S
1
2
1
Coding soft data in BMEGUI
BMEGUI supports the following three data types.
Hard data
Soft data with uniform distribution
Soft data with Gaussian distribution
When using the default settings, BMEGUI assumes that the data file only contains hard data, and in that case it
uses only the fields described so far (i.e. the X field, the Y field, the T field, the optional ID field, and the Data
field containing the hard data values. However, when using a combination of hard and soft data, then BMEGUI
requires that the Data field be replaced by the following three fields: The Data type field, the Value1 field, and the
Value2 field. The Data type field is used to specify the type of data. The Value1 and Value2 fields are used to
describe the data, as follow:
Hard data
o Data Type: 0
o Value1 Field: The true value (e.g. a measurement without error)
o Value2 Field: Same as Value 1
Soft uniform data
o Data Type: 1
o Value1 Field: Lower bound of the interval for the true value
o Value2 Field: Upper bound of the interval for the true value
Soft Gaussian data
o Data Type: 2
o Value1 Field: Mean (also called expectation) of the true value.
o Value2 Field: Standard deviation of the true value around its mean
Example (CSV Format) of hard and soft data
X,Y,T,Type,Val1,Val -74.35,40.55,0,0,0.4012,0. -74.35,40.55,1,0,0.5528,0. -74.35,40.55,2,1,0.7637,0. -74.35,40.55,3,1,1.0592,1. -74.35,40.55,4,0,0.9344,0. -74.35,40.55,5,0,0.98,0. -74.35,40.55,6,0,0.96489,0. -74.35,40.55,7,0,0.8023,0. -74.35,40.55,8,2,0.7396,0. -74.35,40.55,9,2,0.6551,0. -74.35,40.55,10,0,0.562,0. Data type: 1 (Soft uniform data) Lower Bound: 1. Upper Bound: 1. Data type: 2 (Soft Gaussian data) Mean: 0. Standard Deviation: 0.
Coding soft data in BMElib In BMElib , the soft pdf fS ( soft) = fS ( 1 )… fS ( ns) is coded in a discretized form using 4 variables: softpdftype , nl , limi , and probdens. The reader can type: help probasyntax for a detailed explanation of how these variables work. The first variable ( softpdftype ) is an integer taking values 1, 2, 3 and 4. It specifies the type of soft pdf as follows: 1 for histogram, 2 for linear, 3 for histogram on a regular grid, and 4 for linear on a regular grid. Along each of the n s dimension the univariate pdf fS ( i ) is defined using intervals of values for i. The interval limits are specified using the matrix limi , and the value of fS ( i ) in these intervals is specified by the matrix probdens. nl : (nsx 1 ) vector of the number of interval limits. nl ( i ) is the number of interval limits used to define the soft pdf fS ( i ) at point p i limi : (nsx l ) matrix of interval limits, where l is equal to either max( nl ) or 3, depending on the softpdftype. If softpdftype =1 or 2 then limi is a ns by max( nl ) matrix, and limi ( i ,1: nl ( i )) are the interval limits for soft data i. If softpdftype =3 or 4 then limi is a ns by 3 matrix. The interval limits are on a regular grid, and limi ( i ,1:3) are the lower limit, increment, and upper limit of the interval limits for soft data i probdens : (nsx p ) matrix of pdf values, where p is equal to either max( nl )-1 or max( nl ), depending on the softpdftype. If softpdftype ==1 or 3 then probdens is a ns by max( nl )-1 matrix. The pdf value is constant in each interval, and probdens (i, nl (i)-1) are the value of the pdf in each interval. If softpdftype ==2 or 4 then probdens is a ns by max( nl ) matrix. The pdf value varies linearly between interval limits, and probdens (i, nl (i)) are the value of the pdf at each interval limit.
EXAMPLE with softpdftype =1 (soft pdf of histogram type)
>> softpdftype=1;
>> nl=4;
>> limi=[0 2 3 4];
>> probdens=[1 3 2]/7;
>> h=probaplot(softpdftype,nl,limi,probdens);
EXAMPLE with softpdftype =3 (soft pdf of histogram type on regular grid)
>> softpdftype=3;
>> nl=5;
>> limi=[0 1 4];
>> probdens=[1 2 3 2]/8;
>> h=probaplot(softpdftype,nl,limi,probdens);
EXAMPLE with softpdftype =4 (soft pdf of linear type on regular grid)
>> softpdftype=4;
>> nl=5;
>> limi=[0 1 4];
>> probdens=[0 3 1 2 0]/6;
>> h=probaplot(softpdftype,nl,limi,probdens);
The probaplot.m function, allowing to plot soft data, has the following syntax
>> h=probaplot(softpdftype,nl,limi,probdens,S,idx);
EXAMPLE:
>> [cs,isST,softpdftype,nl,limi,probdens,filetitle]=readProba('somesoftdata.txt');
>> subplot(2,1,1); h=probaplot(softpdftype,nl,limi,probdens,'-',1);
>> subplot(2,1,2); h=probaplot(softpdftype,nl,limi,probdens, '-',2);
Generating soft data
The probaGaussian.m and probaUniform.m generate soft data of with Gaussian and uniform
distributions, respectively. For example the following code generate a two soft data points, the first is Gaussian
with mean 2 and variance 3, the second data point is Gaussian with mean 1 and variance 4.
>> [softpdftype,nl,limi,probdens]=probaGaussian([2;10],[3;4]);
>> subplot(2,1,1); h=probaplot(softpdftype,nl,limi,probdens,'-',1);
>> subplot(2,1,2); h=probaplot(softpdftype,nl,limi,probdens, '-',2);
% specify calculation parameters
nhmax=10; % max number of hard data in estimation neighborhood
nsmax=10; % max number of soft data in estimation neighborhood
dmax=[100]; % dmax=max spatial search radius for estimation neighborhood
options=BMEoptions; % Use default options
% specify the coordinate of estimation point
ck=[1 1]; % The estimation point is (1,1)
% calculate BME posterior pdf using BMEprobaPdf
[z,pdf,info]=BMEprobaPdf([],ck,ch,cs,zh,softpdftype,nl,limi,probdens,covmodel,covparam,nhmax,nsmax,dmax,or
der,options);
% calculate moments of BME posterior pdf using BMEprobaMoments
[moments,info]=BMEprobaMoments(ck,ch,cs,zh,softpdftype,nl,limi,probdens,covmodel,covparam,nhmax,nsmax,
dmax,order,options);
expecvalk=moments(:,1)
vark=moments(:,2)