ITE / code / shared / embedded / ITL / qmi_ed.m

% The following function computes the Euclidean distance quadratic mutual information between two vectors X and Y.
%
% Input:   Both X and Y should be COLUMN vectors of SAME length (nxd_x) and (nxd_y).
%				'kSize' is a scalar for the kernel size.
%
% Output: 'val' contains the Euclidean distance quadratic mutual information
%
% Default:  kSize = 1.
%
% Comments: The code uses Incomplete Cholesky Decomposition.
%
% Author: Sohan Seth (sohan@cnel.ufl.edu)	Date: 01.06.2009

function val = qmi_ed(X,Y,kernelSize)

if nargin == 2
    kernelSize = 1;
end

n = length(X);
Gxx = incompleteCholeskySigma(X,kernelSize);
Gyy = incompleteCholeskySigma(Y,kernelSize);
dx = size(Gxx,2); dy = size(Gyy,2);
A = Gxx' * Gyy; % dx x dy
B = ones(1,n) * Gxx; % 1 x dx
C = ones(1,n) * Gyy; % 1 x dy

val = ones(1,dx) * (A.^2) * ones(dy,1)/(n^2) + (C*C') * (B*B') / (n^4) - 2* (B * A * C') / (n^3);
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.