-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlethPresent.m
65 lines (60 loc) · 1.43 KB
/
lethPresent.m
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
58
59
60
61
62
63
64
65
sizea = 2000;
mua = [4 4];
siga = [1 .85; .8 1];
a = gendatgauss(sizea, mua, siga);
sizeb = 50;
mub = [2 6];
sigb = [.3 0; .35 .05];
b = gendatgauss(sizeb, mub, sigb);
f = figure;
hold on;
plot(a.data(:,1), a.data(:,2), '.');
xlim([0 8]);
ylim([0 8]);
xlabel('Measurement 1');
ylabel('Measurement 2');
title('Really Important Data', 'fontsize', 18);
saveas(f, 'lethPresent1.png');
close(f);
f = figure;
hold on;
plot(a.data(:,1), a.data(:,2), '.');
plot(b.data(:,1), b.data(:,2), '.r');
xlim([0 8]);
ylim([0 8]);
xlabel('Measurement 1');
ylabel('Measurement 2');
title('Really Important Data with Outliers', 'fontsize', 18);
saveas(f, 'lethPresent2.png');
close(f);
f = figure;
hold on;
plot(a.data(:,1), a.data(:,2), '.');
plot(b.data(:,1), b.data(:,2), '.r');
xlim([0 8]);
ylim([0 8]);
xlabel('Measurement 1');
ylabel('Measurement 2');
title('95% Confidence Interval', 'fontsize', 18);
x = target_class(prdataset(a, repmat(1, sizea, 1)), 1);
w = gauss_dd(x, .05);
plotc(w);
saveas(f, 'lethPresent3.png');
close(f);
f = figure;
hold on;
plot(a.data(:,1), a.data(:,2), '.');
plot(b.data(:,1), b.data(:,2), '.r');
xlim([0 8]);
ylim([0 8]);
xlabel('Measurement 1');
ylabel('Measurement 2');
title('Two 95% Confidence Intervals', 'fontsize', 18);
x = target_class(prdataset(a, repmat(1, sizea, 1)), 1);
w = gauss_dd(x, .05);
plotc(w);
x = target_class(prdataset(b, repmat(1, sizeb, 1)), 1);
w = gauss_dd(x, .05);
plotc(w);
saveas(f, 'lethPresent4.png');
close(f);