Commits

Zoltan Szabo committed 2e7c93c

Multivariate conditional version of Spearman's rho weighting the lower tail, lower tail dependence via conditional Spearman's rho: added; see 'ASpearman_lt_initialization.m', 'ASpearman_lt_estimation.m', 'ASpearman_L_initialization.m', 'ASpearman_L_estimation.m'. Notes on lower- and upper orthant dependence: added (doc: see 'Spearman1' and 'Spearman2').

Comments (0)

Files changed (7)

+v0.29 (Jan 13, 2012):
+-Lower tail dependence via conditional Spearman's rho: added; see 'ASpearman_L_initialization.m', 'ASpearman_L_estimation.m'.
+-Multivariate conditional version of Spearman's rho weighting the lower tail: added; see 'ASpearman_lt_initialization.m', 'ASpearman_lt_estimation.m'.
+-Notes on lower- and upper orthant dependence: added (doc: see 'Spearman1' and 'Spearman2').
+
 v0.28 (Jan 2, 2012):
 -Multivariate extension of Blomqvist's beta (medial correlation coefficient): added; see 'ABlomqvist_initialization.m', 'ABlomqvist_estimation.m'.
 -Average pairwise Spearman's rho: added; see 'ASpearman4_initialization.m', 'ASpearman4_estimation.m'.
 - `entropy (H)`: Shannon entropy, R�nyi entropy, Tsallis entropy (Havrda and Charv�t entropy), complex entropy,
 - `mutual information (I)`: generalized variance, kernel canonical correlation analysis, kernel generalized variance, Hilbert-Schmidt independence criterion, Shannon mutual information, L2 mutual information, R�nyi mutual information, Tsallis mutual information, copula-based kernel dependency, multivariate version of Hoeffding's Phi, Schweizer-Wolff's sigma and kappa, complex mutual information, Cauchy-Schwartz quadratic mutual information, Euclidean distance based quadratic mutual information, distance covariance, distance correlation, approximate correntropy independence measure,
 - `divergence (D)`: Kullback-Leibler divergence (relative entropy), L2 divergence, R�nyi divergence, Tsallis divergence, Hellinger distance, Bhattacharyya distance, maximum mean discrepancy (kernel distance, an integral probability metric), J-distance (symmetrised Kullback-Leibler divergence), Cauchy-Schwartz divergence, Euclidean distance based divergence, energy distance (specially the Cramer-Von Mises distance),
-- `association measures (A)`, including `measures of concordance`: multivariate extensions of Spearman's rho (Spearman's rank correlation coefficient, grade correlation coefficient), correntropy, centered correntropy, correntropy coefficient, correntropy induced metric, centered correntropy induced metric, multivariate extension of Blomqvist's beta (medial correlation coefficient),
+- `association measures (A)`, including `measures of concordance`: multivariate extensions of Spearman's rho (Spearman's rank correlation coefficient, grade correlation coefficient), correntropy, centered correntropy, correntropy coefficient, correntropy induced metric, centered correntropy induced metric, multivariate extension of Blomqvist's beta (medial correlation coefficient), multivariate conditional version of Spearman's rho, lower tail dependence via conditional Spearman's rho,
 - `cross quantities (C)`: cross-entropy.
 
 ITE offers solution methods for 
 
 **Download** the latest release: 
 
-- code: [zip](https://bitbucket.org/szzoli/ite/downloads/ITE-0.28_code.zip), [tar.bz2](https://bitbucket.org/szzoli/ite/downloads/ITE-0.28_code.tar.bz2), 
-- [documentation (pdf)](https://bitbucket.org/szzoli/ite/downloads/ITE-0.28_documentation.pdf).
+- code: [zip](https://bitbucket.org/szzoli/ite/downloads/ITE-0.29_code.zip), [tar.bz2](https://bitbucket.org/szzoli/ite/downloads/ITE-0.29_code.tar.bz2), 
+- [documentation (pdf)](https://bitbucket.org/szzoli/ite/downloads/ITE-0.29_documentation.pdf).
 
 

code/H_I_D_A_C/base_estimators/ABlomqvist_estimation.m

 %   Friedrich Schmid, Rafael Schmidt, Thomas Blumentritt, Sandra Gaiser, and Martin Ruppert. Copula Theory and Its Applications, Chapter Copula based Measures of Multivariate Association. Lecture Notes in Statistics. Springer, 2010. (multidimensional case, length(ds)>=2)
 %   Manuel Ubeda-Flores. Multivariate versions of Blomqvist's beta and Spearman's footrule. Annals of the Institute of Statistical Mathematics, 57:781-788, 2005.
 %   Nils Blomqvist. On a measure of dependence between two random variables. The Annals of Mathematical Statistics, 21:593-600, 1950. (2D case, statistical properties)
-% Frederick Mosteller. On some useful ''inefficient'' statistics. Annals of Mathematical Statistics, 17:377--408, 1946. (2D case, def)
+%   Frederick Mosteller. On some useful ''inefficient'' statistics. Annals of Mathematical Statistics, 17:377--408, 1946. (2D case, def)
 %
 %Copyright (C) 2012 Zoltan Szabo ("http://nipg.inf.elte.hu/szzoli", "szzoli (at) cs (dot) elte (dot) hu")
 %

code/H_I_D_A_C/base_estimators/ASpearman_lt_estimation.m

+function [A] = ASpearman_lt_estimation(Y,ds,co)
+%Estimates the multivariate conditional version of Spearman's rho; the measure weights the lower tail of the copula. The estimation is based on the empirical copula.
+%
+%We use the naming convention 'A<name>_estimation' to ease embedding new association measure estimator methods.
+%
+%INPUT:
+%   Y: Y(:,t) is the t^th sample.
+%  ds: subspace dimensions.
+%  co: association measure estimator object.
+%
+%REFERENCE:
+%   Friedrich Schmid and Rafael Schmidt. Multivariate conditional versions of Spearman's rho and related measures of tail dependence. Journal of Multivariate Analysis, 98:1123-1140, 2007.
+%   C. Spearman. The proof and measurement of association between two things. The American Journal of Psychology, 15:72-101, 1904.
+%
+%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/>.
+
+%co.mult:OK.
+
+%verification:
+    if sum(ds) ~= size(Y,1);
+        error('The subspace dimensions are not compatible with Y.');
+    end
+    if ~one_dimensional_problem(ds)
+        error('The subspaces must be one-dimensional for this estimator.');
+    end
+    
+[d,num_of_samples] = size(Y); %dimension, number of samples
+U = copula_transformation(Y);
+
+%constants:
+    p = co.p;
+    c1 = (p^2/2)^d;
+    c2 = p^(d+1)/(d+1);
+
+A = (mean(prod(max(p-U,0))) - c1) / (c2 - c1);
+

code/H_I_D_A_C/base_estimators/ASpearman_lt_initialization.m

+function [co] = ASpearman_lt_initialization(mult)
+%Initialization of the multivariate conditional version of Spearman's rho estimator; the measure weights the lower tail of the copula.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We use the naming convention 'A<name>_initialization' to ease embedding new association measure estimator 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 = 'Spearman_lt';
+    co.mult = mult;
+    
+%other fields:
+    co.p = 1/2; %0<p<=1
+   

code/H_I_D_A_C/meta_estimators/ASpearman_L_estimation.m

+function [A] = ASpearman_L_estimation(Y,ds,co)
+%Estimates lower tail dependence based on the conditional Spearman's rho.
+%
+%INPUT:
+%   Y: Y(:,t) is the t^th sample.
+%  ds: subspace dimensions.
+%  co: association measure estimator object.
+%
+%Note:
+%   1)We use the naming convention 'A<name>_estimation' to ease embedding new association measure estimator methods.
+%   2)This is a meta method: the conditional Spearman's rho estimator (of lower tail) can be arbitrary.
+%
+%REFERENCE:
+%   Friedrich Schmid and Rafael Schmidt. Multivariate conditional versions of Spearman's rho and related measures of tail dependence. Journal of Multivariate Analysis, 98:1123-1140, 2007.
+%   C. Spearman. The proof and measurement of association between two things. The American Journal of Psychology, 15:72-101, 1904.
+%
+%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/>.
+
+%co.mult:OK.
+
+%verification:
+    if sum(ds) ~= size(Y,1);
+        error('The subspace dimensions are not compatible with Y.');
+    end
+    if ~one_dimensional_problem(ds)
+        error('The subspaces must be one-dimensional for this estimator.');
+    end
+
+%p:    
+    num_of_samples = size(Y,2);
+    k = floor(sqrt(num_of_samples));
+    co.member_co.p = k/num_of_samples; %set p
+
+A = A_estimation(Y,ds,co.member_co);
+

code/H_I_D_A_C/meta_estimators/ASpearman_L_initialization.m

+function [co] = ASpearman_L_initialization(mult)
+%Initialization of the lower tail dependence estimator based on the conditional Spearman's rho.
+%
+%Note:
+%   1)The estimator is treated as a cost object (co).
+%   2)We use the naming convention 'A<name>_initialization' to ease embedding new association measure estimator 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 = 'Spearman_L';
+    co.mult = mult;
+    
+%other fields:
+    co.member_name = 'Spearman_lt'; %you can change it to any conditional Spearman's rho (of lower tail) estimator
+    co.member_co = A_initialization(co.member_name,mult);
+