Zoltan Szabo avatar Zoltan Szabo committed 2069255

8 sample spacing based 1d Shannon/Rényi entropy estimators: added; see 'HShannon_spacing_V_initialization.m', 'HShannon_spacing_V_estimation.m', 'HShannon_spacing_Vb_initialization.m', 'HShannon_spacing_Vb_estimation.m', 'HShannon_spacing_Vpconst_initialization.m', 'HShannon_spacing_Vpconst_estimation.m', 'HShannon_spacing_Vplin_initialization.m', 'HShannon_spacing_Vplin_estimation.m', 'HShannon_spacing_LL_initialization.m', 'HShannon_spacing_LL_estimation.m', 'HRenyi_spacing_V_initialization.m', 'HRenyi_spacing_V_estimation.m', 'HRenyi_spacing_E_initialization.m', 'HRenyi_spacing_E_estimation.m', 'HRenyi_CDSS_initialization.m', 'HRenyi_CDSS_estimation.m'.

Comments (0)

Files changed (30)

+v0.18 (Nov 10, 2012):
+-8 sample spacing based 1d Shannon/Rényi entropy estimators: added; see 'HShannon_spacing_V_initialization.m', 'HShannon_spacing_V_estimation.m', 'HShannon_spacing_Vb_initialization.m', 'HShannon_spacing_Vb_estimation.m', 'HShannon_spacing_Vpconst_initialization.m', 'HShannon_spacing_Vpconst_estimation.m', 'HShannon_spacing_Vplin_initialization.m', 'HShannon_spacing_Vplin_estimation.m', 'HShannon_spacing_LL_initialization.m', 'HShannon_spacing_LL_estimation.m', 'HRenyi_spacing_V_initialization.m', 'HRenyi_spacing_V_estimation.m', 'HRenyi_spacing_E_initialization.m', 'HRenyi_spacing_E_estimation.m', 'HRenyi_CDSS_initialization.m', 'HRenyi_CDSS_estimation.m'.,
 -minimum spanning tree, geodesic spanning forest: reference updated (doc+comments); For the latter, see 'HRenyi_MST_estimation', 'HRenyi_GSF_estimation.m'.
 -A note on a built-in helping automatism of meta estimators: added (comments); see 'HTsallis_HRenyi_initialization.m', 'IRenyi_DRenyi_initialization.m', 'IRenyi_HRenyi_initialization.m', 'ITsallis_DTsallis_initialization.m'.
 -some 'co.mul=mult' -> 'co.mult=mult' typo corrected (to be precise, the computations were OK); see 'ITsallis_DTsallis_initialization.m', 'IShannon_HShannon_initialization.m', 'IRenyi_HRenyi_initialization.m', 'IRenyi_DRenyi_initialization.m', 'IL2_DL2_initialization.m', 'Icomplex_initialization.m', 'HRPensemble_initialization.m', 'Hensemble_initialization.m', 'Hcomplex_initialization.m'.

code/H_I_D/base_estimators/DBhattacharyya_kNN_k_estimation.m

 
 %D_ab (Bhattacharyya coefficient):
 	if co.p %[p(x)dx]
-		D_ab= estimate_Dab(X,Y,co);
+		D_ab = estimate_Dtemp2(X,Y,co);
 	else %[q(x)dx]
-		D_ab = estimate_Dab(Y,X,co);
+		D_ab = estimate_Dtemp2(Y,X,co);
 	end
 
 %D = -log(D_ab);%theoretically

code/H_I_D/base_estimators/DHellinger_kNN_k_estimation.m

 
 %D_ab (Bhattacharyya coefficient):
 	if co.p %[p(x)dx]
-		D_ab = estimate_Dab(X,Y,co);
+		D_ab = estimate_Dtemp2(X,Y,co);
 	else %[q(x)dx]
-		D_ab = estimate_Dab(Y,X,co);
+		D_ab = estimate_Dtemp2(Y,X,co);
 	end
 
 %D = sqrt(1-D_ab);%theoretically

code/H_I_D/base_estimators/DRenyi_kNN_k_estimation.m

     disp('Error: the dimension of X and Y must be equal.');
 end
 
-D_alpha = estimate_Dalpha(X,Y,co);
-D = log(D_alpha) / (co.alpha-1);
+Dtemp1 = estimate_Dtemp1(X,Y,co);
+D = log(Dtemp1) / (co.alpha-1);

code/H_I_D/base_estimators/DTsallis_kNN_k_estimation.m

     disp('Error: the dimension of X and Y must be equal.');
 end
 
-D_alpha = estimate_Dalpha(X,Y,co);
-D = (D_alpha-1)/(co.alpha-1);
+Dtemp1 = estimate_Dtemp1(X,Y,co);
+D = (Dtemp1-1)/(co.alpha-1);

code/H_I_D/base_estimators/HRenyi_CDSS_estimation.m

+function [H] = HRenyi_CDSS_estimation(Y,co)
+%Estimates the quadratic Renyi entropy (H) of Y (Y(:,t) is the t^th sample) based on continuously differentiable sample spacing. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods. 
+%
+%REFERENCE: Umut Ozertem, Ismail Uysal, and Deniz Erdogmus. Continuously differentiable sample-spacing entropy estimation. IEEE Transactions on Neural Networks, 19:1978-1984, 2008.
+%
+%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/>.
+
+d = size(Y,1);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    Y_sorted = sort(Y);
+    H = compute_CDSS(Y_sorted);
+end

code/H_I_D/base_estimators/HRenyi_CDSS_initialization.m

+function [co] = HRenyi_CDSS_initialization(mult)
+%Initialization of the quadratic (i.e., co.alpha = 2: fixed) Renyi entropy (H) estimator based on continuously differentiable sample spacing.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Renyi_CDSS';
+    co.mult = mult;   

code/H_I_D/base_estimators/HRenyi_spacing_E_estimation.m

+function [H] = HRenyi_spacing_E_estimation(Y,co)
+%Estimates the Renyi entropy (H) of Y (Y(:,t) is the t^th sample) using an extension of the 'empiric entropy estimation of order m' method. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods. 
+%
+%REFERENCE:
+%    	Mark P. Wachowiak,  Renata Smolikova, Georgia D. Tourassi, and Adel S. Elmaghraby. Estimation of generalized entropies with sample spacing. Pattern Analysis and Applications 8: 95-101, 2005.
+%      
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty; m<num_of_samples/2
+    Y_sorted = sort(Y);
+    Y_sorted = [repmat(Y_sorted(1),1,m),Y_sorted,repmat(Y_sorted(end),1,m)];
+    d1 = diff(Y_sorted)/2; %(y_(k)-y_(k-1))/2
+    
+    diff1 = ev(d1,1,m-1,m);
+    diff2 = ev(d1,0,num_of_samples-m,m) + ev(d1,m,num_of_samples,m);
+    diff3 = ev(d1,num_of_samples+1-m,num_of_samples-1,m);
+    
+    dm = Y_sorted([1+m:num_of_samples+m]+m) - Y_sorted([1-m:num_of_samples-m]+m);
+    dm_inv = 2./dm;%2/[y_(k+m)-y_(k-m)]
+    
+    idiff1 = cumsum(ev(dm_inv,1-m,-1,m));
+    idiff2_temp = ev(dm_inv,1-m,num_of_samples-m,m);%L-sum
+    idiff2 = Lsum(idiff2_temp,m);
+    idiff3 = fliplr(cumsum(fliplr( ev(dm_inv,num_of_samples+2-2*m,num_of_samples-m,m) )));
+
+    term1 = sum(diff1.*(idiff1.^co.alpha));
+    term2 = sum(diff2.*(idiff2.^co.alpha));
+    term3 = sum(diff3.*(idiff3.^co.alpha));
+    
+    H = term1 + term2 + term3;
+    H = log(H/num_of_samples^co.alpha) / (1-co.alpha);
+    
+end
+
+%-------------------
+function [v] = ev(v0,start_idx,end_idx,off)
+%Extraction of the [start_idx:end_idx] coordinates from vector v0, with
+%offset off.
+
+v = v0([start_idx:end_idx]+off);
+
+function[v] = Lsum(v,L)
+%[v_1,...,v_T] -> [v_1+..._v_L,v_2+...+v_{2+L-1},...,v_{K-L+1}...+v_K], K=length(v)
+
+f = filter(ones(1,L),1,v);
+v = f(L:end);
+

code/H_I_D/base_estimators/HRenyi_spacing_E_initialization.m

+function [co] = HRenyi_spacing_E_initialization(mult)
+%Initialization of the Renyi entropy (H) estimator based on the extension of the 'empiric entropy estimation of order m' method.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Renyi_spacing_E';
+    co.mult = mult;   
+
+%other fields:
+    co.alpha = 0.99; %The Renyi entropy (H_{R,alpha}) equals to the Shannon differential entropy (H) in limit: H_{R,alpha} -> H, as alpha -> 1.
+            

code/H_I_D/base_estimators/HRenyi_spacing_V_estimation.m

+function [H] = HRenyi_spacing_V_estimation(Y,co)
+%Estimates the Renyi entropy (H) of Y (Y(:,t) is the t^th sample) using an extension of Vasicek's spacing method. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods. 
+%
+%REFERENCE:
+%    	Mark P. Wachowiak,  Renata Smolikova, Georgia D. Tourassi, and Adel S. Elmaghraby. Estimation of generalized entropies with sample spacing. Pattern Analysis and Applications 8: 95-101, 2005.
+%
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty; m<num_of_samples/2
+    Y_sorted = sort(Y);
+    Y_sorted = [repmat(Y_sorted(1),1,m),Y_sorted,repmat(Y_sorted(end),1,m)];
+    diffs = Y_sorted(2*m+1:num_of_samples+2*m) - Y_sorted(1:num_of_samples);
+    H = log(mean((num_of_samples / (2*m) * diffs).^(1-co.alpha))) / (1-co.alpha);
+end
+
+  
+

code/H_I_D/base_estimators/HRenyi_spacing_V_initialization.m

+function [co] = HRenyi_spacing_V_initialization(mult)
+%Initialization of the Renyi entropy (H) estimator based on the extension of Vasicek's spacing method.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Renyi_spacing_V';
+    co.mult = mult;   
+
+%other fields:
+    co.alpha = 0.99; %The Renyi entropy (H_{R,alpha}) equals to the Shannon differential entropy (H) in limit: H_{R,alpha} -> H, as alpha -> 1.
+            

code/H_I_D/base_estimators/HShannon_spacing_LL_estimation.m

+function [H] = HShannon_spacing_LL_estimation(Y,co)
+%Estimates the Shannon entropy (H) of Y (Y(:,t) is the t^th sample) using Correa's spacing method (locally linear regression). Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods. 
+%
+%REFERENCE:
+%    	Juan C. Correa. A new estimator of entropy. Communications in Statistics - Theory and Methods, Volume 24, Issue 10, pp. 2439-2449, 1995.  
+%      
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty; m<num_of_samples/2
+    Y_sorted = sort(Y);
+    Y_sorted = [repmat(Y_sorted(1),1,m),Y_sorted,repmat(Y_sorted(end),1,m)];
+    b = colfilt(Y_sorted,[1,2*m+1],'sliding',@locally_linear_regression);
+    b = b(m+1:end-m);%discard the superfluous values
+    H = -mean(log(b/num_of_samples));
+end
+

code/H_I_D/base_estimators/HShannon_spacing_LL_initialization.m

+function [co] = HShannon_spacing_LL_initialization(mult)
+%Initialization of the Shannon entropy (H) estimator based on Correa's spacing method (locally linear regression).
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Shannon_spacing_LL';
+    co.mult = mult;   
+

code/H_I_D/base_estimators/HShannon_spacing_V_estimation.m

+function [H] = HShannon_spacing_V_estimation(Y,co)
+%Estimates the Shannon entropy (H) of Y (Y(:,t) is the t^th sample) using Vasicek's spacing method. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods.
+%
+%REFERENCE:
+%   Oldrich Vasicek. A test for normality based on sample entropy. Journal of the Royal Statistical Society, Series B, 38(1):54�59, 1976.
+%
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty; m<num_of_samples/2
+    Y_sorted = sort(Y);
+    Y_sorted = [repmat(Y_sorted(1),1,m),Y_sorted,repmat(Y_sorted(end),1,m)];
+    diffs = Y_sorted(2*m+1:num_of_samples+2*m) - Y_sorted(1:num_of_samples);
+    H = mean(log (num_of_samples / (2*m) * diffs));
+end
+
+  
+

code/H_I_D/base_estimators/HShannon_spacing_V_initialization.m

+function [co] = HShannon_spacing_V_initialization(mult)
+%Initialization of Vasicek's spacing based Shannon differential entropy (H) estimator.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Shannon_spacing_V';
+    co.mult = mult;   
+            

code/H_I_D/base_estimators/HShannon_spacing_Vb_estimation.m

+function [H] = HShannon_spacing_Vb_estimation(Y,co)
+%Estimates the Shannon entropy (H) of Y (Y(:,t) is the t^th sample) using Vasicek's spacing method with a bias correction. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods.
+%
+%REFERENCE:
+%   Bert Van Es. Estimating Functionals Related to a Density by a Class of Statistics Based on Spacings. Scandinavian Journal of Statistics, 19:61-72, 1992.
+%
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty; m: can also be fixed
+    Y_sorted = sort(Y);
+    diffs = Y_sorted(1+m:num_of_samples) - Y_sorted(1:num_of_samples-m);
+    b = sum(1./[m:num_of_samples]) + log(m/(num_of_samples+1));%bias correction
+    H = mean(log((num_of_samples+1)/m*diffs)) + b;
+end
+
+  
+

code/H_I_D/base_estimators/HShannon_spacing_Vb_initialization.m

+function [co] = HShannon_spacing_Vb_initialization(mult)
+%Initialization of the Shannon differential entropy (H) estimator using Vasicek's spacing method with a bias correction.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Shannon_spacing_Vb';
+    co.mult = mult;   
+            

code/H_I_D/base_estimators/HShannon_spacing_Vpconst_estimation.m

+function [H] = HShannon_spacing_Vpconst_estimation(Y,co)
+%Estimates the Shannon entropy (H) of Y (Y(:,t) is the t^th sample) using Vasicek's spacing method with piecewise constant correction. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods.
+%
+%REFERENCE: Nader Ebrahimi, Kurt Pflughoeft, and Ehsan S. Soofi. Two measures of sample entropy. Statistics and Probability Letters, 20:225-234, 1994.
+%
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    %as a base estimator:
+        m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty
+        Y_sorted = sort(Y);
+        Y_sorted = [repmat(Y_sorted(1),1,m),Y_sorted,repmat(Y_sorted(end),1,m)];
+        diffs = Y_sorted(2*m+1:num_of_samples+2*m) - Y_sorted(1:num_of_samples);
+        c = [ones(1,m),2*ones(1,num_of_samples-2*m),ones(1,m)]; %piecewise constant correction
+        H = mean(log (num_of_samples / m * diffs./c));
+    %as a meta estimator:
+        %HV = H_estimation(Y,co.member_co);
+        %H = HV + 2*m/num_of_samples * log(2);
+end
+
+  
+

code/H_I_D/base_estimators/HShannon_spacing_Vpconst_initialization.m

+function [co] = HShannon_spacing_Vpconst_initialization(mult)
+%Initialization of the Shannon differential entropy (H) estimator of Vasicek's spacing technique with piecewise constant correction.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Shannon_spacing_Vpconst';
+    co.mult = mult;  
+    
+%other fields (if one would like to implement it as a meta estimator):
+    %co.member_name = 'Shannon_spacing_V';
+    %co.member_co = H_initialization(co.member_name,mult);
+    
+            

code/H_I_D/base_estimators/HShannon_spacing_Vplin_estimation.m

+function [H] = HShannon_spacing_Vplin_estimation(Y,co)
+%Estimates the Shannon entropy (H) of Y (Y(:,t) is the t^th sample) using Vasicek's spacing method with piecewise linear correction. Cost parameters are provided in the cost object co.
+%
+%We make use of the naming convention 'H<name>_estimation', to ease embedding new entropy estimation methods.
+%
+%REFERENCE: Nader Ebrahimi, Kurt Pflughoeft and Ehsan S. Soofi. Two measures of sample entropy. Statistics and Probability Letters, 20(3):225-234, 1994.
+%
+%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/>.
+
+[d,num_of_samples] = size(Y);
+if d~=1
+    disp('Error: samples must be one-dimensional for this estimator.');
+else
+    m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty; m<num_of_samples/2
+    Y_sorted = sort(Y);
+    Y_sorted = [repmat(Y_sorted(1),1,m),Y_sorted,repmat(Y_sorted(end),1,m)];
+    diffs = Y_sorted(2*m+1:num_of_samples+2*m) - Y_sorted(1:num_of_samples);
+    c = [1+([1:m]-1)/m,2*ones(1,num_of_samples-2*m),1+(num_of_samples-[num_of_samples-m+1:num_of_samples])/m]; %piecewise linear correction
+    H = mean(log (num_of_samples / m * diffs./c));
+end
+
+  
+

code/H_I_D/base_estimators/HShannon_spacing_Vplin_initialization.m

+function [co] = HShannon_spacing_Vplin_initialization(mult)
+%Initialization of the Shannon differential entropy (H) estimator of Vasicek's spacing technique with piecewise linear correction.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We make use of the naming convention 'H<name>_initialization', to ease embedding new entropy estimation methods.
+%
+%INPUT:
+%   mult: is a multiplicative constant relevant (needed) in the estimation; '=1' means yes, '=0' no.
+%OUTPUT:
+%   co: cost object (structure).
+%
+%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/>.
+
+%mandatory fields:
+    co.name = 'Shannon_spacing_Vplin';
+    co.mult = mult;   
+            

code/H_I_D/utilities/compute_CDSS.cpp

+#include "mex.h"
+#include "math.h"
+
+/* .cpp version of 'compute_CDSS.m' */
+
+/* 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/>. */
+
+void mexFunction(
+    int nlhs, mxArray *plhs[],
+    int nrhs, const mxArray *prhs[])
+{
+
+    double *Y;    /* pointer to the input matrix (row vector) */    
+    mwSize T;    
+    
+    Y = mxGetPr(prhs[0]); /* create a pointer to the input matrix */
+    T = mxGetN(prhs[0]);  /* number of columns */
+        
+    double *H;    
+    /* Allocating array for H */
+    plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);
+    H = mxGetPr(plhs[0]);    
+    
+    mwSize i,j,m;
+    
+    m = floor(sqrt(T));
+    *H = 0;
+    for (i=1; i<T-m+1; i++) {   /* i: in Matlab sense*/
+    for (j=i+1; j<i+m-1+1; j++) {   /* j: in Matlab sense*/
+        *H = *H + pow(Y[j-1]-Y[i+m-1],2) * pow(Y[j-1]-Y[i-1],2) / pow(Y[i+m-1]-Y[i-1],5);
+    }
+    }
+    *H = -log(30 * *H / (T*(T-m)));
+
+}

code/H_I_D/utilities/compute_CDSS.m

+function [H] = compute_CDSS(Y_sorted)
+%Computes the Renyi quadratic entropy (H) for the 'Renyi_CDSS' entropy estimator, see 'HRenyi_CDSS_estimation.m'.
+%
+%INPUT:
+%   Y_sorted: vector, Y_sorted(t) is the t^th sample, Y_sorted(1)<=...<=Y_sorted(end).
+%
+%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/>.
+
+num_of_samples = length(Y_sorted);
+m = floor(sqrt(num_of_samples));%m/num_of_samples->0, m,num_of_samples->infty
+H = 0;
+for i = 1 : num_of_samples-m
+    for j = i+1 : i+m-1
+        H = H + (Y_sorted(j) - Y_sorted(i+m))^2 * (Y_sorted(j) - Y_sorted(i))^2 / (Y_sorted(i+m) - Y_sorted(i))^5;
+    end
+end
+H = -log(30*H/(num_of_samples*(num_of_samples-m)));
+   

code/H_I_D/utilities/estimate_Dab.m

-function [D_ab] = estimate_Dab(X,Y,co)
-%Estimates D_ab = \int p^a(x)q^b(x)dx; the Hellinger distance and the Bhattacharyya distance are simple functions of this quantity.
-%
-%INPUT:
-%   X: X(:,t) is the t^th sample from the first distribution.
-%   Y: Y(:,t) is the t^th sample from the second distribution.
-%  co: cost object (structure).
-%
-%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/>.
-
-%initialization:
-    [d,num_of_samplesY] = size(Y);
-    [d,num_of_samplesX] = size(X);
-    a = co.a;
-    b = co.b;
-    k = co.k;
-
-squared_distancesXX = kNN_squared_distances(X,X,co,1);
-squared_distancesYX = kNN_squared_distances(Y,X,co,0);
-dist_k_XX = sqrt(squared_distancesXX(end,:));
-dist_k_YX = sqrt(squared_distancesYX(end,:));
-
-c = volume_of_the_unit_ball(d);
-B = c^(-(a+b)) * gamma(k)^2 / (gamma(k-a)*gamma(k-b));
-D_ab = (num_of_samplesX-1)^(-a) * num_of_samplesY^(-b) * B * mean(dist_k_XX.^(-d*a).*dist_k_YX.^(-d*b));
-

code/H_I_D/utilities/estimate_Dalpha.m

-function [D_alpha] = estimate_Dalpha(X,Y,co)
-%Estimates D_alpha = \int p^{\alpha}(x)q^{1-\alpha}(x)dx, the Renyi and the Tsallis divergences are simple functions of this quantity.
-%
-%INPUT:
-%   X: X(:,t) is the t^th sample from the first distribution.
-%   Y: Y(:,t) is the t^th sample from the second distribution.
-%  co: cost object (structure).
-%
-%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/>.
-
-[d,num_of_samplesY] = size(Y);
-[d,num_of_samplesX] = size(X);
-
-squared_distancesXX = kNN_squared_distances(X,X,co,1);
-squared_distancesYX = kNN_squared_distances(Y,X,co,0);
-dist_k_XX = sqrt(squared_distancesXX(end,:));
-dist_k_YX = sqrt(squared_distancesYX(end,:));
-
-B = gamma(co.k)^2 / (gamma(co.k-co.alpha+1)*gamma(co.k+co.alpha-1));
-D_alpha = mean( ((num_of_samplesX-1)/num_of_samplesY * (dist_k_XX./dist_k_YX).^d).^(1-co.alpha))  * B;

code/H_I_D/utilities/estimate_Dtemp1.m

+function [Dtemp1] = estimate_Dtemp1(X,Y,co)
+%Estimates Dtemp1 = \int p^{\alpha}(x)q^{1-\alpha}(x)dx, the Renyi and the Tsallis divergences are simple functions of this quantity.
+%
+%INPUT:
+%   X: X(:,t) is the t^th sample from the first distribution.
+%   Y: Y(:,t) is the t^th sample from the second distribution.
+%  co: cost object (structure).
+%
+%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/>.
+
+[d,num_of_samplesY] = size(Y);
+[d,num_of_samplesX] = size(X);
+
+squared_distancesXX = kNN_squared_distances(X,X,co,1);
+squared_distancesYX = kNN_squared_distances(Y,X,co,0);
+dist_k_XX = sqrt(squared_distancesXX(end,:));
+dist_k_YX = sqrt(squared_distancesYX(end,:));
+
+B = gamma(co.k)^2 / (gamma(co.k-co.alpha+1)*gamma(co.k+co.alpha-1));
+Dtemp1 = mean( ((num_of_samplesX-1)/num_of_samplesY * (dist_k_XX./dist_k_YX).^d).^(1-co.alpha))  * B;

code/H_I_D/utilities/estimate_Dtemp2.m

+function [Dtemp2] = estimate_Dtemp2(X,Y,co)
+%Estimates Dtemp2 = \int p^a(x)q^b(x)dx; the Hellinger distance and the Bhattacharyya distance are simple functions of this quantity.
+%
+%INPUT:
+%   X: X(:,t) is the t^th sample from the first distribution.
+%   Y: Y(:,t) is the t^th sample from the second distribution.
+%  co: cost object (structure).
+%
+%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/>.
+
+%initialization:
+    [d,num_of_samplesY] = size(Y);
+    [d,num_of_samplesX] = size(X);
+    a = co.a;
+    b = co.b;
+    k = co.k;
+
+squared_distancesXX = kNN_squared_distances(X,X,co,1);
+squared_distancesYX = kNN_squared_distances(Y,X,co,0);
+dist_k_XX = sqrt(squared_distancesXX(end,:));
+dist_k_YX = sqrt(squared_distancesYX(end,:));
+
+c = volume_of_the_unit_ball(d);
+B = c^(-(a+b)) * gamma(k)^2 / (gamma(k-a)*gamma(k-b));
+Dtemp2 = (num_of_samplesX-1)^(-a) * num_of_samplesY^(-b) * B * mean(dist_k_XX.^(-d*a).*dist_k_YX.^(-d*b));
+

code/H_I_D/utilities/locally_linear_regression.m

+function [w] = locally_linear_regression(x)
+%Locally linear regression on x, the weights are returned in w.
+%
+%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/>.
+
+m = (size(x,1)-1)/2;%dim(x)=2m+1
+x = bsxfun(@minus, x, mean(x,1)); %x-mean(x)
+w = ([-m:m] * x) ./ sum(x.^2,1);

code/ITE_install.m

 		compile_TCA = 1;%1=compile, 0=do not compile (chol_gauss); not necessary, but can further speed-up the computations; the package also contains the purely Matlab/Octave 'chol_gauss.m'
 		compile_SWICA = 1; %1=compile, 0=do not compile; not necessary, but can accelerate computations; the package also contains the purely Matlab/Octave 'SW_kappa.m' and 'SW_sigma.m'
 		compile_Hoeffding_term1 = 1; %1=compile, 0=do not compile; not necessary, but can be more ecomical in terms of memory used + accelerate computations; the package also contains the purely Matlab/Octave 'Hoeffding_term1.m'
-		compile_Edgeworth_t1_t2_t3 = 1; %1=compile, 0=do not compile; not necessary, but can accelerate computations; the package also contains the purely Matlab/Octave 'Edgeworth_t1_t2_t3.m'
+		compile_Edgeworth_t1_t2_t3 = 1; %1=compile, 0=do not compile; not necessary, but can accelerate computations; the ITE package also contains the purely Matlab/Octave 'Edgeworth_t1_t2_t3.m'
+		compile_CDSS = 1; %1=compile, 0=do not compile; not necessary, but can speed up the computations; the ITE package also contains the purely Matlab/Octave 'compute_CDSS.m'
     %download:
 		download_ARfit = 1;%1=download+extract,0=do not download
 	delete_Ncut_in_Octave = 0; %1=yes, 0=no
     end
 end
 
-%compile TCA (chol_gauss), if needed:	
+%compile TCA (chol_gauss.c), if needed:	
 	if compile_TCA
         cd(strcat(ITE_code_dir,'/shared/embedded/TCA'));%cd 'TCA'
         disp('TCA (chol_gauss.c) compilation: started.');
         disp('TCA (chol_gauss.c) compilation: ready.');
     end
     
-%compile SWICA (SW_kappa, SW_sigma), if needed:    
+%compile SWICA (SW_kappa.cpp, SW_sigma.cpp), if needed:    
     if compile_SWICA
         cd(strcat(ITE_code_dir,'/shared/embedded/SWICA'));%cd 'SWICA'
         disp('SWICA (SW_kappa.cpp, SW_sigma.cpp) compilation: started.');
         disp('Hoeffding_term1.cpp compilation: ready.');
     end
 
-%compile 'Edgeworth_t1_t2_t3', if needed:
+%compile 'Edgeworth_t1_t2_t3.cpp', if needed:
     if compile_Edgeworth_t1_t2_t3
         cd(strcat(ITE_code_dir,'/H_I_D/utilities'));
         disp('Edgeworth_t1_t2_t3.cpp compilation: started.');
         mex Edgeworth_t1_t2_t3.cpp;
         disp('Edgeworth_t1_t2_t3.cpp compilation: ready.');
-	end
-    
+    end
+
+%compile 'compute_CDSS.cpp', if needed:
+    if compile_CDSS
+        cd(strcat(ITE_code_dir,'/H_I_D/utilities'));
+        disp('compute_CDSS.cpp compilation: started.');
+        mex compute_CDSS.cpp;
+        disp('compute_CDSS.cpp compilation: ready.');
+    end
+
 %compile 'knn', if needed:
     if compile_knn%if needed
         cd(strcat(ITE_code_dir,'/shared/embedded/knn'));
Add a comment to this file

doc/ITE_documentation.pdf

Binary file modified.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.