forked from PRML/PRMLT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function z = condEntropy (x, y) | ||
% Compute conditional entropy z=H(x|y) of two discrete variables x and y. | ||
% Input: | ||
% x, y: two vectors of integers of the same length | ||
% x, y: two integer vector of the same length | ||
% Output: | ||
% z: conditional entropy z=H(x|y) | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function z = jointEntropy(x, y) | ||
% Compute joint entropy z=H(x,y) of two discrete variables x and y. | ||
% Input: | ||
% x, y: two vectors of integers of the same length | ||
% x, y: two integer vector of the same length | ||
% Output: | ||
% z: joint entroy z=H(x,y) | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function z = mutInfo(x, y) | ||
% Compute mutual information I(x,y) of two discrete variables x and y. | ||
% Input: | ||
% x, y: two vectors of integers of the same length | ||
% x, y: two integer vector of the same length | ||
% Output: | ||
% z: mutual information z=I(x,y) | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function z = nmi(x, y) | ||
% Compute normalized mutual information I(x,y)/sqrt(H(x)*H(y)) of two discrete variables x and y. | ||
% Input: | ||
% x, y: two vectors of integers of the same length | ||
% x, y: two integer vector of the same length | ||
% Ouput: | ||
% z: normalized mutual information z=I(x,y)/sqrt(H(x)*H(y)) | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function z = nvi(x, y) | ||
% Compute normalized variation information z=(1-I(x,y)/H(x,y)) of two discrete variables x and y. | ||
% Input: | ||
% x, y: two vectors of integers of the same length | ||
% x, y: two integer vector of the same length | ||
% Output: | ||
% z: normalized variation information z=(1-I(x,y)/H(x,y)) | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function z = relatEntropy (x, y) | ||
% Compute relative entropy (a.k.a KL divergence) z=KL(p(x)||p(y)) of two discrete variables x and y. | ||
% Input: | ||
% x, y: two vectors of integers of the same length | ||
% x, y: two integer vector of the same length | ||
% Output: | ||
% z: relative entropy (a.k.a KL divergence) z=KL(p(x)||p(y)) | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters