Attachment 'sheet03.m'
Download 1 function sheet03
2
3 %
4 % sinc function data set
5 %
6 [X, Y] = sincdata(100);
7 figure(1)
8 plot(X, Y, '.');
9 title('the data')
10
11 figure(2)
12 plotkpca1d(rbfkern(5, X, X), X, 5)
13 legend('1', '2', '3', '4', '5')
14 title('first 5 kPCA dimensions')
15 grid
16
17 %
18 % two blobs data set
19 %
20 [X, Y] = twoblobdata(500);
21 figure(3)
22 gscatter(X(:, 1), X(:, 2), Y);
23
24 figure(4)
25 w = 10;
26 plotkpca2d(rbfkern(w, X, X), X, 9)
27
28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 %
30 % Your solutions below
31 %
32 function [X, Y] = sincdata(N)
33 % ...
34
35 function [X, Y] = twoblobdata(N)
36 % ...
37
38 function K = rbfkern(w, X, Y)
39 % ...
40
41 function plotkpca1d(K, X, D)
42 % ...
43
44 function plotkpca2d(K, X, D)
45 % ...
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.