-
Notifications
You must be signed in to change notification settings - Fork 1
/
SMILE_demo.asv
executable file
·68 lines (46 loc) · 1.44 KB
/
SMILE_demo.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
%% Prediction Demo (Greg)
close all
clear all
clc
% Intro text
fprintf(['##########################################################################################\n\n'...
'This script will demonstrate the ability of SMILE to predict Greg''s mood as being\n'...
'positive, negative, or neutral.\n\n'...
'We have prepared by running our program with machine learning turned on. Our program\n'...
'allows users to save machine learning data and selectively reload it in any later\n'...
'session.\n\nPress any button to continue...\n\n']);
pause()
% Run demo
h = EmotivSMILE();
h.runSMILE('demo');
% Give demo results
n = 0;
p = 0;
iter = h.demoResults.iterator();
while iter.hasNext()
if strcmp(iter.next(), 'negative')
n = n + 1;
else
p = p + 1;
end
end
if n > p
disp('User was feeling more negative')
elseif p > n
disp('User was feeling more positive')
else
disp('User was feeling neutral')
end
fprintf('Times counted negative: %d\nTimes counted positive: %d\n', n, p);
% View decision tree that we have previously demonstrated
h.veiwTree();
%% Learning Demo
close all
h.delete();
% Intro text
fprintf(['##########################################################################################\n\n'...
'This script will demonstrate the machine learning of SMILE.\n\n'...
'Press any button to continue...\n\n']);
pause()
h.runSMILE('learn');
h.delete();