Attachment 'sheet09.m'

Download

   1 function sheet09
   2 
   3 X = textread('splice-train-data.txt', '%s');
   4 Y = load('splice-train-label.txt');
   5 XE = textread('splice-test-data.txt', '%s');
   6 YE = load('splice-test-label.txt');
   7 
   8 tic
   9 fprintf('Writing training features for k = 1\n');
  10 write_wdk_features('wdk1-train.txt', 1, X, Y);
  11 fprintf('Writing test features for k = 1\n');
  12 write_wdk_features('wdk1-test.txt', 1, XE, YE);
  13 toc
  14 
  15 tic
  16 fprintf('Writing training features for k = 2\n');
  17 write_wdk_features('wdk2-train.txt', 2, X, Y);
  18 fprintf('Writing test features for k = 2\n');
  19 write_wdk_features('wdk2-test.txt', 2, XE, YE);
  20 toc
  21 
  22 tic
  23 fprintf('Writing training features for k = 3\n');
  24 write_wdk_features('wdk3-train.txt', 3, X, Y);
  25 fprintf('Writing test features for k = 3\n');
  26 write_wdk_features('wdk3-test.txt', 3, XE, YE);
  27 toc
  28 
  29 function beta = beta(K, k)
  30 beta = 2 * (K - k + 1) / K / (K + 1);
  31 
  32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  33 %
  34 % Your solution below
  35 %
  36 
  37 % 1. write out weighted degree kernel features
  38 % out into file FN up to degree K. (You should accept values of K = 1, 2,
  39 % 3
  40 function write_wdk_features(FN, K, X, Y)
  41 % ...

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] (2011-06-22 07:45:04, 2873.9 KB) [[attachment:bio_intro.pdf]]
  • [get | view] (2011-05-02 16:51:13, 1341.1 KB) [[attachment:buchner_chap2007.pdf]]
  • [get | view] (2011-04-19 12:05:37, 3719.0 KB) [[attachment:cca_lecture.pdf]]
  • [get | view] (2011-07-20 11:25:53, 1778.9 KB) [[attachment:chemo_lecture.pdf]]
  • [get | view] (2011-05-16 22:58:50, 723.1 KB) [[attachment:deep_lecture.pdf]]
  • [get | view] (2011-04-11 15:08:58, 95.6 KB) [[attachment:full_sheet01.pdf]]
  • [get | view] (2011-04-19 11:33:46, 130.0 KB) [[attachment:full_sheet02.pdf]]
  • [get | view] (2011-05-02 16:53:54, 123.4 KB) [[attachment:full_sheet03.pdf]]
  • [get | view] (2011-05-10 10:03:36, 112.2 KB) [[attachment:full_sheet04.pdf]]
  • [get | view] (2011-05-17 09:43:04, 34.8 KB) [[attachment:full_sheet05.pdf]]
  • [get | view] (2011-05-23 12:18:47, 95.7 KB) [[attachment:full_sheet06.pdf]]
  • [get | view] (2011-05-30 13:35:32, 98.3 KB) [[attachment:full_sheet07.pdf]]
  • [get | view] (2011-06-07 15:23:13, 125.3 KB) [[attachment:full_sheet08.pdf]]
  • [get | view] (2011-06-21 08:43:34, 164.4 KB) [[attachment:full_sheet09.pdf]]
  • [get | view] (2011-07-05 09:39:18, 100.4 KB) [[attachment:full_sheet10.pdf]]
  • [get | view] (2011-05-31 20:33:20, 2656.3 KB) [[attachment:ids_lect.pdf]]
  • [get | view] (2011-05-24 15:25:30, 2121.4 KB) [[attachment:kern_struct.pdf]]
  • [get | view] (2011-06-14 10:50:39, 1169.4 KB) [[attachment:mkl_intro.pdf]]
  • [get | view] (2011-05-04 09:54:42, 512.3 KB) [[attachment:ml2_bss.pdf]]
  • [get | view] (2011-05-17 09:43:15, 7656.4 KB) [[attachment:mnist.mat]]
  • [get | view] (2011-06-07 18:29:45, 192.5 KB) [[attachment:opt_intro.pdf]]
  • [get | view] (2011-05-17 09:43:21, 1.7 KB) [[attachment:rbm.m]]
  • [get | view] (2011-05-02 16:54:43, 0.7 KB) [[attachment:sfft.m]]
  • [get | view] (2011-05-30 13:37:07, 4.3 KB) [[attachment:sheet07.m]]
  • [get | view] (2011-06-21 08:43:43, 1.1 KB) [[attachment:sheet09.m]]
  • [get | view] (2011-05-17 09:43:25, 0.1 KB) [[attachment:sigmoid.m]]
  • [get | view] (2011-06-21 08:43:50, 129.6 KB) [[attachment:splice-test-data.txt]]
  • [get | view] (2011-06-21 08:43:55, 5.4 KB) [[attachment:splice-test-label.txt]]
  • [get | view] (2011-06-21 08:44:00, 59.6 KB) [[attachment:splice-train-data.txt]]
  • [get | view] (2011-06-21 08:44:05, 2.5 KB) [[attachment:splice-train-label.txt]]
  • [get | view] (2011-04-18 07:30:47, 1515.8 KB) [[attachment:ssa_data.mat]]
  • [get | view] (2011-04-18 07:28:13, 585.7 KB) [[attachment:ssa_lecture.pdf]]
  • [get | view] (2011-04-18 07:30:20, 7.4 KB) [[attachment:ssa_simple.m]]
  • [get | view] (2011-07-05 11:05:27, 1202.4 KB) [[attachment:structured_lecture.pdf]]
  • [get | view] (2011-05-30 13:36:38, 1217.5 KB) [[attachment:stud-data.mat.gz]]
  • [get | view] (2011-04-18 07:29:43, 1.0 KB) [[attachment:tkcca_example.m]]
  • [get | view] (2011-04-18 07:29:54, 4.1 KB) [[attachment:tkcca_simple.m]]
  • [get | view] (2011-04-18 07:30:07, 150.9 KB) [[attachment:tkcca_toy_data.mat]]
  • [get | view] (2011-05-02 16:51:28, 4.5 KB) [[attachment:umfbss.m]]
  • [get | view] (2011-05-02 16:03:05, 531.3 KB) [[attachment:x1.wav]]
  • [get | view] (2011-05-02 16:03:12, 531.3 KB) [[attachment:x2.wav]]
 All files | Selected Files: delete move to page copy to page

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