Attachment 'sheet02.m'

Download

   1 function sheet02
   2 
   3 % generate a swissroll data set
   4 [X, Y] = swissroll(1000);
   5 
   6 figure(1)
   7 scatter3(X(:, 1), X(:, 2), X(:, 3), 30, Y, 'filled')
   8 
   9 % apply t-SNE
  10 no_dims = 2;
  11 init_dims = 3;
  12 perplexity = 50;
  13 
  14 %mappedX = tsne(X, [], no_dims, init_dims, perplexity);
  15 mappedX = X
  16 
  17 % plot mapped data
  18 figure(2)
  19 scatter(mappedX(:, 1), mappedX(:, 2), 20, Y);
  20 
  21 % load mnist data
  22 load mnist_train.mat
  23 ind = randperm(size(train_X, 1));
  24 train_X = train_X(ind(1:1000),:);
  25 train_labels = train_labels(ind(1:1000));
  26 
  27 no_dims = 2;
  28 init_dims = 30;
  29 perplexity = 30;
  30 
  31 mappedX = tsne(train_X, [], no_dims, init_dims, perplexity);
  32 
  33 % plot data
  34 figure(3)
  35 show_mnist(mappedX, train_X, train_labels);
  36 
  37 
  38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  39 %
  40 % Your solutions below
  41 %
  42 
  43 % Generate swissroll data
  44 function [X, Y] = swissroll(N)
  45 % your solution here...
  46 
  47 % Show results on the mnist data set. Show all points as dots,
  48 % show 50 random samples as small image.
  49 function show_mnist(mappedX, train_X, train_labels)
  50 % your solution here...

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.
  • [get | view] (2009-06-16 13:02:17, 2873.9 KB) [[attachment:bioinf.pdf]]
  • [get | view] (2009-06-09 09:46:52, 209.6 KB) [[attachment:data.tar.gz]]
  • [get | view] (2009-05-26 09:12:28, 3099.4 KB) [[attachment:intrusion.pdf]]
  • [get | view] (2009-06-02 09:30:50, 1391.7 KB) [[attachment:kld-tutorial.pdf]]
  • [get | view] (2009-07-07 09:31:30, 1506.0 KB) [[attachment:largescale.pdf]]
  • [get | view] (2009-07-07 09:34:04, 192.5 KB) [[attachment:optim-intro.pdf]]
  • [get | view] (2009-05-05 08:16:16, 261.1 KB) [[attachment:recap2.pdf]]
  • [get | view] (2009-04-21 08:42:30, 66.5 KB) [[attachment:sheet01.pdf]]
  • [get | view] (2009-04-28 14:08:19, 1.0 KB) [[attachment:sheet02.m]]
  • [get | view] (2009-04-28 14:08:14, 62.8 KB) [[attachment:sheet02.pdf]]
  • [get | view] (2009-05-05 08:17:47, 0.6 KB) [[attachment:sheet03.m]]
  • [get | view] (2009-05-05 08:22:37, 90.9 KB) [[attachment:sheet03.pdf]]
  • [get | view] (2009-05-12 15:17:16, 1.9 KB) [[attachment:sheet04.m]]
  • [get | view] (2009-05-19 09:18:26, 110.6 KB) [[attachment:sheet04.pdf]]
  • [get | view] (2009-05-19 09:05:24, 63.6 KB) [[attachment:sheet05.pdf]]
  • [get | view] (2009-05-26 09:39:01, 4.4 KB) [[attachment:sheet06.m]]
  • [get | view] (2009-05-26 09:38:57, 84.0 KB) [[attachment:sheet06.pdf]]
  • [get | view] (2009-06-02 09:30:26, 0.9 KB) [[attachment:sheet07.m]]
  • [get | view] (2009-06-02 09:30:21, 72.2 KB) [[attachment:sheet07.pdf]]
  • [get | view] (2009-06-09 09:46:48, 2.2 KB) [[attachment:sheet08.m]]
  • [get | view] (2009-06-09 11:10:06, 60.3 KB) [[attachment:sheet08.pdf]]
  • [get | view] (2009-06-09 11:10:02, 2.3 KB) [[attachment:sheet08.py]]
  • [get | view] (2009-06-16 13:02:05, 122.2 KB) [[attachment:sheet09.pdf]]
  • [get | view] (2009-06-23 12:50:29, 1.1 KB) [[attachment:sheet10.m]]
  • [get | view] (2009-06-23 12:48:35, 77.4 KB) [[attachment:sheet10.pdf]]
  • [get | view] (2009-06-23 12:49:27, 5.8 KB) [[attachment:sheet10.tex]]
  • [get | view] (2009-07-07 13:55:57, 1.0 KB) [[attachment:sheet11.m]]
  • [get | view] (2009-07-07 13:58:20, 81.3 KB) [[attachment:sheet11.pdf]]
  • [get | view] (2009-06-23 12:48:40, 58.4 KB) [[attachment:splice.zip]]
  • [get | view] (2009-05-25 08:18:18, 591.1 KB) [[attachment:ssl2.pdf]]
  • [get | view] (2009-05-19 09:05:38, 614.6 KB) [[attachment:structured2.pdf]]
  • [get | view] (2009-05-26 09:39:05, 1217.5 KB) [[attachment:stud-data.mat.gz]]
  • [get | view] (2009-06-08 17:46:34, 1013.6 KB) [[attachment:textmining.pdf]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.