tansaku / py-coursera

Python framework for Coursera PGM and ML homeworks
49 stars 63 forks source link

would like supporting files, e.g. q1y.dat, q1x.dat, costFunctionJ.m #5

Open tansaku opened 12 years ago

tansaku commented 12 years ago

Prof Ng's Octave tutorial relies on a few supporting files we don't have access to. I think we can transcribe something similar from watching the video and typing stuff out, but it's a bit of a pain.

I believe I requested these files back in the Fall 2011 ML course, but I notice that that entire site is off line, which is slightly disturbing ...

Anyway, I want to get to the point that the entire ipython transcript can be run and the expected output recorded, for which the associated files would be handy ...

jtratner commented 12 years ago

you can just make up any old q1y.dat, q1x.dat, just run numpy and save a matrix of whatever kind you like (or use pickle...not a huge deal).

As for costFunctionJ.m, maybe better to just pick something else (so we don't post code that's the actual solution to a problem online) -- we could really define any old function, maybe we could grab one of the functions from matplotlib's gallery?

tansaku commented 12 years ago

Ah, hmm. Is costFunctionJ.m a solution to something? It's displayed I'm full in the tutorial and I just copied it out. I don't have access to ML so can't check.

Certainly don't want to be posting any solutions, but isn't it just part of the tutorial.

Regarding the data files, yes for the tutorial and old files will do, but it's nice to have the same set for consistency. Also if memory serves they were used as examples in the early python lectures and I always wanted to get hold of them. I partially scraped them from the video ...

jtratner commented 12 years ago

costFunctionJ.m is a homework question for ML.

On Sun, Jul 22, 2012 at 3:54 PM, Sam Joseph < reply@reply.github.com

wrote:

Ah, hmm. Is costFunctionJ.m a solution to something? It's displayed I'm full in the tutorial and I just copied it out. I don't have access to ML so can't check.

Certainly don't want to be posting any solutions, but isn't it just part of the tutorial.

Regarding the data files, yes for the tutorial and old files will do, but it's nice to have the same set for consistency. Also if memory serves they were used as examples in the early python lectures and I always wanted to get hold of them. I partially scraped them from the video ...


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164889

Jeffrey Tratner Brown University, Class of 2011

jeffrey.tratner@gmail.com 401.484.1825

tansaku commented 12 years ago

Weird ... Then doesn't the octave tutorial reveal the answer?

Assuming it is I need to pull it off. Will do as soon as I can get to sit down with the laptop ... Although that might be a while since I'm travelling ... :-/

iPhone$B$+$iAw?.(B

On 2012/07/23, at 5:06, Jeff Tratnerreply@reply.github.com wrote:

costFunctionJ.m is a homework question for ML.

On Sun, Jul 22, 2012 at 3:54 PM, Sam Joseph < reply@reply.github.com

wrote:

Ah, hmm. Is costFunctionJ.m a solution to something? It's displayed I'm full in the tutorial and I just copied it out. I don't have access to ML so can't check.

Certainly don't want to be posting any solutions, but isn't it just part of the tutorial.

Regarding the data files, yes for the tutorial and old files will do, but it's nice to have the same set for consistency. Also if memory serves they were used as examples in the early python lectures and I always wanted to get hold of them. I partially scraped them from the video ...


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164889

Jeffrey Tratner Brown University, Class of 2011

jeffrey.tratner@gmail.com 401.484.1825


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164990

jtratner commented 12 years ago

the tutorial doesn't actually show the file, it's just used as an example of how to work with functions in octave. it would be equivalent to have a separate file with a matplotlib-style function that takes in some data.

On Sun, Jul 22, 2012 at 4:33 PM, Sam Joseph < reply@reply.github.com

wrote:

Weird ... Then doesn't the octave tutorial reveal the answer?

Assuming it is I need to pull it off. Will do as soon as I can get to sit down with the laptop ... Although that might be a while since I'm travelling ... :-/

iPhone $B$+$iAw?. (B

On 2012/07/23, at 5:06, Jeff Tratnerreply@reply.github.com wrote:

costFunctionJ.m is a homework question for ML.

On Sun, Jul 22, 2012 at 3:54 PM, Sam Joseph < reply@reply.github.com

wrote:

Ah, hmm. Is costFunctionJ.m a solution to something? It's displayed I'm full in the tutorial and I just copied it out. I don't have access to ML so can't check.

Certainly don't want to be posting any solutions, but isn't it just part of the tutorial.

Regarding the data files, yes for the tutorial and old files will do, but it's nice to have the same set for consistency. Also if memory serves they were used as examples in the early python lectures and I always wanted to get hold of them. I partially scraped them from the video ...


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164889

Jeffrey Tratner Brown University, Class of 2011

jeffrey.tratner@gmail.com 401.484.1825


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164990


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7165329

Jeffrey Tratner Brown University, Class of 2011

jeffrey.tratner@gmail.com 401.484.1825

tansaku commented 12 years ago

It shows enough of it for me to copy it over :-). Well anyhow you're right that it doesn't have to be that exact file, although the section in the tutorial on vectorization seems strongly related.

It's frustrating that I don't have access to the ML class even though I took it in fall 2011. I can't now see the context for a lot of this stuff ... Anyway will get it sorted eventually.

Based on discussion in google group I'm thinking next thing might be a testing framework to make sure all the code runs on all platforms - lots to sort - not sure when I'll get to the laptop ...

Btw, are you getting the google group emails?

https://groups.google.com/forum/m/?fromgroups#!forum/py-coursera

Cheers, Sam

iPhone$B$+$iAw?.(B

On 2012/07/23, at 5:45, Jeff Tratnerreply@reply.github.com wrote:

the tutorial doesn't actually show the file, it's just used as an example of how to work with functions in octave. it would be equivalent to have a separate file with a matplotlib-style function that takes in some data.

On Sun, Jul 22, 2012 at 4:33 PM, Sam Joseph < reply@reply.github.com

wrote:

Weird ... Then doesn't the octave tutorial reveal the answer?

Assuming it is I need to pull it off. Will do as soon as I can get to sit down with the laptop ... Although that might be a while since I'm travelling ... :-/

iPhone $B$+$iAw?. (B

On 2012/07/23, at 5:06, Jeff Tratnerreply@reply.github.com wrote:

costFunctionJ.m is a homework question for ML.

On Sun, Jul 22, 2012 at 3:54 PM, Sam Joseph < reply@reply.github.com

wrote:

Ah, hmm. Is costFunctionJ.m a solution to something? It's displayed I'm full in the tutorial and I just copied it out. I don't have access to ML so can't check.

Certainly don't want to be posting any solutions, but isn't it just part of the tutorial.

Regarding the data files, yes for the tutorial and old files will do, but it's nice to have the same set for consistency. Also if memory serves they were used as examples in the early python lectures and I always wanted to get hold of them. I partially scraped them from the video ...


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164889

Jeffrey Tratner Brown University, Class of 2011

jeffrey.tratner@gmail.com 401.484.1825


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7164990


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7165329

Jeffrey Tratner Brown University, Class of 2011

jeffrey.tratner@gmail.com 401.484.1825


Reply to this email directly or view it on GitHub: https://github.com/tansaku/py-coursera/issues/5#issuecomment-7165437

ByteJuggler commented 12 years ago

It turns out that costFunctionJ.m used in the Week 2 Tutorial video "Control Statements: for, while, if statements" at position 09:48 is effectively the solution to the Week 1 programming assignment file "computeCostMulti.m"

tansaku commented 12 years ago

okay, so I just adjusted this to costFunctionJ.py and removed the "solution" code - haven't really checked that the supporting code is correct, but it's basically a placeholder for some function to load. I need to review the full tutorial again, but wanted to get something up - I'm going to prioritize some kind of testing framework so that we can reliably check all code is working after changes