Skip to content

Commit

Permalink
Update CONDOR.m
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-labUCL committed Jun 11, 2021
1 parent bc0e746 commit d837a90
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CONDORv1.0/CONDOR.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
load(filename)

prompt = 'What is the dimension (1,2,3)? '; % Ask for dimension of the trajectory (1, 2, 3)
d = input(prompt); % 1 for traj1D_example
d = input(prompt); % 1 for traj_example

%% Ask user what to do (networks training and/or prediction)
prompt = 'Would you like to train CONDOR networks for classification (y/n)? ';
Expand Down Expand Up @@ -41,13 +41,15 @@
MomentaInputs = ExtractFeatures(traj, Dataset.dimension, Dataset.size);
cd ..

save 'tmp' '-regexp' choice
clearvars -except traj Dataset filename Alpha Model MomentaInputs
save(filename, 'traj', 'Dataset', 'filename', 'Alpha', 'Model', 'MomentaInputs')
load('tmp')
delete 'tmp.mat'
varTosave = {'filename', 'traj', 'Dataset', 'MomentaInputs', 'Alpha', 'Model'};

for i = 1:length(varTosave)
if exist(varTosave{i}, 'var')
save(filename, varTosave{i}, '-append')
end
end
end

%% Call to function to train the networks for classification (reference needed)
if choice1 == 'y'
disp('Training for classification starting...')
Expand Down

0 comments on commit d837a90

Please sign in to comment.