LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 7 (http://book.caltech.edu/bookforum/forumdisplay.php?f=136)
-   -   *ANSWER* hw7, q1..4 (http://book.caltech.edu/bookforum/showthread.php?t=4303)

doneit 05-21-2013 11:25 AM

*ANSWER* hw7, q1..4
 
This week I've switched to using Octave. I thought I had Q1..4 in the bag but only got one right. Can anyone suggest from these results what I may have done wrong?

Code:

Q        K        Ein                Eout

1        3        0.600000        0.700000
1        4        0.440000        0.300000
1        5        0.320000        0.500000
1        6        0.080000        0.200000
1        7        0.040000        0.000000

2        3        0.600000        0.648000
2        4        0.440000        0.420000
2        5        0.320000        0.416000
2        6        0.080000        0.188000
2        7        0.040000        0.084000

3        3        0.400000        0.440000
3        4        0.400000        0.280000
3        5        0.300000        0.360000
3        6        0.200000        0.200000
3        7        0.000000        0.080000

4        3        0.400000        0.500000
4        4        0.400000        0.396000
4        5        0.300000        0.388000
4        6        0.200000        0.284000
4        7        0.000000        0.192000


Elroch 05-21-2013 12:36 PM

Re: *answer* hw7, q1..4
 
Most of your data appears be shifted in a strange way. You will see what I mean if you look at the numbers I got corresponding to the options in Q1-Q4. Was there an indexing error?

(1) 0.3 0.5 0.2 0.0 0.1
(2) 0.420 0.416 0.188 0.084 0.072
(3) 0.28 0.36 0.20 0.08 0.12
(4) 0.396 0.388 0.284 0.192 0.196

doneit 05-21-2013 01:40 PM

Re: *ANSWER* hw7, q1..4
 
Drat & double drat, forgot to account for Z index starting from zero :( Thanks Elroch!


All times are GMT -7. The time now is 10:37 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.