Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Applications/code/call_run_for_each_input.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ function call_run_for_each_input(inputI, dataL)
coreNAME_woL = 'newStack';
dataL = dataL;
inputN = inputI;
r_date = date;
exactStart = -1;
target_est = 'step';
dataNormalize = 0;
Expand Down
11 changes: 8 additions & 3 deletions Applications/construct_hmm_stack.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,27 @@ function construct_hmm_stack(recordInfo)

%% Run the profile-HMM algorithm

% Set `datetime` string
t = datetime;
DateStringTest = datestr(t);
folderDateString = strrep(DateStringTest,' ','_');

cd code

% Criteria of convergence
iterTol = 0.1; %% Iteration stops if log likelihood does not increase larger than iterTol%
iterMax = 10; %% Iteration stops if the number of iteration is larget than iterMax.

contiIter = true;
run_for_communication('newStack', dataL, date, 1, 'step', 0);
run_for_communication('newStack', dataL, folderDateString, 1, 'step', 0);
i = 0;
while contiIter == true
i = i + 1;

for inputI = 1 : length(name)
call_run_for_each_input(inputI, dataL)
call_run_for_each_input(inputI, dataL, folderDateString)
end
LL(i) = run_for_communication('newStack', dataL, date, 1, 'step', 0);
LL(i) = run_for_communication('newStack', dataL, folderDateString, 1, 'step', 0);

if i ~= 1
if abs(LL(i)-LL(i-1))/LL(i-1) < iterTol/100
Expand Down