-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:uShadow/tabletop-private
- Loading branch information
Showing
14 changed files
with
96 additions
and
64 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
function jobParam = jobparam | ||
jobParam.verbose = true; | ||
jobParam.destroy = true; | ||
jobParam.destroy = false; | ||
jobParam.type = 'local'; | ||
jobParam.path = [genpath('c:/users/yingyin/workspace/tabletop/matlab-lib/lib') ';' genpath(pwd)]; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function error = errorperframe(Ytrue, Ystar) | ||
error = sum(1 - (cell2mat(Ytrue) == cell2mat(Ystar)), 2); | ||
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
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,9 @@ | ||
function stat = evalseqclass(Ytrue, Ystar) | ||
% EVALSEQCLASS evaluates the classification as a sequence not by frame. | ||
% Args: | ||
% - Ytrue: a vector. | ||
% - Ystar: a vector. | ||
trueLabel = unique(Ytrue); | ||
actualLabel = unqiue(Ystar); | ||
stat = edit_distance_levenshtein(trueLabel, actualLabel); | ||
end |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,21 @@ | ||
function R = inferenceahmm(ahmm, data, predictNode) | ||
function R = inferenceahmm(ahmm, data, predictNode, method) | ||
|
||
engine = smoother_engine(jtree_2TBN_inf_engine(ahmm)); | ||
|
||
nseq = length(data); | ||
R = cell(1, nseq); | ||
for i = 1 : nseq | ||
evidence = data{i}; | ||
engine = enter_evidence(engine, evidence); | ||
R{i} = mapest(engine, predictNode, length(evidence)); | ||
|
||
% Find the most probable explanation (Viterbi). | ||
%mpe = find_mpe(engine, evidence); | ||
%R{i} = mpe(predictNode, :); | ||
switch method | ||
case 'fixed-interval-smoothing' | ||
engine = enter_evidence(engine, evidence); | ||
R{i} = mapest(engine, predictNode, length(evidence)); | ||
case 'viterbi' | ||
% Find the most probable explanation (Viterbi). | ||
mpe = find_mpe(engine, evidence); | ||
R{i} = mpe(predictNode, :); | ||
otherwise | ||
error(['Inference method not implemented: ' method]); | ||
end | ||
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
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
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
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