forked from chnor/PatternRec
-
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
1 parent
a5a1e83
commit eba8314
Showing
3 changed files
with
43 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
function randExample (trainingSet) | ||
|
||
%Input: | ||
%trainingSet that you can find using the TrainClassifiersPier function | ||
% | ||
%---------------------------------------------------- | ||
%Code Authors: | ||
% Pierre Laurent | ||
% Christopher Norman | ||
%---------------------------------------------------- | ||
vectorSize = 10000; | ||
HMMs = trainingSet.HMMs; | ||
classes = trainingSet.classes; | ||
A = [HMMs{1,:}]; | ||
|
||
|
||
for i=1:9 | ||
randVec{i} = rand(HMMs{i}, vectorSize); | ||
end | ||
|
||
figure('Name','Plotting rand vectors obtained from each source','NumberTitle','off') | ||
|
||
|
||
for i = 1:9 | ||
x = 1 : size(HMMs, 2); | ||
subplot(3,3,i) | ||
stem(x, logprob(A, randVec{i})); | ||
set(gca, 'XtickLabel', classes); | ||
set(gca, 'Xtick', 1:size(HMMs, 2)); | ||
xlabel ('HMM index'); | ||
ylabel ('logprob(X, HMM)'); | ||
title (classes(i)) | ||
end | ||
|
||
|
||
|
||
|
||
end | ||
|
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