Hacker News new | past | comments | ask | show | jobs | submit login
Coursera Machine Learning MOOC by Andrew Ng – Python Programming Assignments (github.com/dibgerge)
214 points by sonabinu on Sept 20, 2018 | hide | past | favorite | 45 comments



This is cool. The assignments were translated from matlab to python and they implemented submitting and grading.

That said, Andrew Ng's new deep learning course on Coursera is already taught using python, numpy,and tensorflow. The content is less math-heavy but more up to date. Anybody interested in studying machine learning should consider taking the new course instead.


The new course only teaches deep learning. His machine learning course is a totally different course (though it covers neural networks for 1 week).


FYI as many others have posted, there are no solutions posted here (before you get up on your high horse to decry such a thing)

This is a reimplementation of the exercises, originally in matlab/octave, into python and numpy.

The author even made the notebooks work with the Coursera grader!


Thumbs done on posting the solutions. That's programming class etiquette 101. From the fact that 64 people upvoted this post, I assume I'm in for some downvotes but what's right is right.


Did you actually look at the notebooks? There are no solutions, just the exercise questions.


The student needs to enter their own code to the section that says "YOUR CODE HERE":

https://github.com/dibgerge/ml-coursera-python-assignments/s...


If a free-class asks you not to do something, it's etiquette 101 to follow that.


Not if that thing goes against the more fundamental principle of sharing knowledge.

Also: copying someone's solutions is self-destructive if you want to learn something, but that's still damage you do to yourself only. The reason MOOCs care about this is because they desperately try to place themselves in the credentials game - they want their paid certificate for the free course to mean something, so that you'll want to pay them. This is not obviously bad, but it's also not obviously good.


MOOCs care because they want to be in the credentials game, but some students want to be in the credentials game too. Suppose you want to apply to a job in ML even though you don't have prior work experience in that. You do have a certificate saying that you completed all the lessons and the homework and tests.

The meaningfulness of the certificate could mean the difference between you getting the job or not. If it's common knowledge that it's easy to cheat on the course, then you're likely not getting the job.


I am not sure looking at others solutions is even self destructive. That’s how reading the manual, literature, open source programs work. If people didn’t look at other people’s solution we wouldn’t get Einstein (if he didn’t build on Maxwell, etc)


That is a false analogy. This is in the structure of a class not some paper or industry. There is a reason the teacher doesn't want you to straight up look at solutions, maybe to generate a sense of intuition yourself. A lot of CS courses also have a project component where you get to use whatever resources to make something new.


we are talking about basic assignments to further understanding of a well understood topic. Doing the assignment itself is critical to the educational experience of truly understanding that topic, reading a solution robs you of that


I'm glad that we share the same understanding. By any chance do you have any teaching background?

As for myself I had 8 years of industry experience, followed by 4 years of teaching, then back to industry.


never formally, but TAing in grad school and tutoring math/physics since high school has definitely given me a profound respect for teaching and helping others learn


Not op but not only would it rob me of knowledge if I finished a course by looking at others' solutions but it also feels "dirty" to do it that way.


Who are you to judge how someone monetizes a thing. It's a free resource, feel free to not do it if you don't agree with their policy.


Posting solutions to Coursera assignments goes against the Coursera honor code.

> You may not share your solutions to homework, quizzes, or exams with anyone else unless explicitly permitted by the instructor.

Source: https://learner.coursera.help/hc/en-us/articles/209818863-Co...


I don't think he's providing the solutions, is he? Just offering an alternative for people, to submit their homeworks using Python instead of Octave.


These are rewrites of the solutions, from Octave to Python. As such no material rules are being broken here.

Massive props to the publisher of these. For science!


How exactly does the fact that these solutions are rewritten in python indemnify the author from this?

> You may not share your solutions to homework

Source: https://learner.coursera.help/hc/en-us/articles/209818863-Co...


Rewrite mate. That's how. These are not answers, concrete solutions to the homework, to the quizzes in the designated language as they are to be submitted.

Besides that part of the honour code just sucks.


To don't share a solution goes against my ethical moral code. Sorry.


this isn't a "solution" in the sense of solving a problem that people use to build upon or share to help others not deal with that problem, rather its an essential part of the educational process of a course to derive the answers yourself to actually learn the material

there is a big difference


These are not solutions, these are assignments


These are python converted exercises not solutions.


Why are the top two comments in this thread by people who didn't bother to look at the notebooks and falsely accusing the author of posting solutions?


"Posting solutions to Coursera assignments goes against the Coursera honor code." I just dont get that mentality in general.

I have (had) a hard time understanding math and programming (and logic in general) from whatever resources. What I need is a problem (or task) and then the solution. At the start I will have no clue so I just check the solution. Then after some exercises I see the pattern and I "blindly" use that to solve the problems without peaking. After doing that for some time I suddenly understand the whole thing.



I'm very impressed they integrating with the online grader!


The programming assignments are a proxy to real life problems you will encounter. In real life often there are no answers to copy from. It is also not realistic to expect the instructors to provide a unique questions for everyone. A bad actor can always pay someone for solutions.

Therefore you should approach the question with no other knowledge that is unique to the problem. Googling for how to use numPy is fine.

If you want to go around the central objective of the exercise - which is to adapt yourself to solve the problem - at the end you are only cheating yourself. You may end up with a cert of some sort, but you will definitely fail the technical interview or get outed by your colleagues for incompetence sooner or later.


Studying solutions is a valid way to learn how to solve problems. In the end, it's on the student to make sure he is not "cheating" himself.

Yeah, just copying the code and saying, "oh, hey, I know machine learning now!" isn't going to work out great. However, if you are stuck on a problem, looking at others' solutions and studying them can let you see exactly what you are missing.


You are being condescending and are plain wrong, we don't need such snobbery in our industry. It's bad enough with the utterly unrealistic white board problems.

Programmers and data scientists use Google every single day for their job.

Telling novices to avoid Google isn't just pathetic, it's a complete lie about how our industry works.

My name is Matt and I still Google basic programming questions even after 12 years.


> If you want to go around the central objective of the exercise - which is to adapt yourself to solve the problem - at the end you are only cheating yourself.

So the "central objective" of that problem is not important? And we shouldn't rely/memorize on 1 unique way of problem solving?

To understand your correctly, you mean we shouldn't just learn to solve an unique problem, but approach the problem like a general problem solver/thinker?

I am used to work on understanding/learning solutions to mathematics questions when I don't know how to solve them myself. And keep on practising similar questions and eventually harder questions to get an A in exams or answering the doubts of my friends.

When I have started to do programming nearly a year ago, It's really squeezing my brain hard. So far, I can tell that only one type of mathematics is similar to programming, is those questions that ask us to derive complex equations for n (like big o notation)


I’m currently on week 8 of Andrew Ng’s original course on machine learning. All the exercises are in Octave/Matlab. I was wondering if Octave is still widely used. I’ve been programming in Python almost exclusively for the past few years. I appreciate the math explanations in this course. I don’t have a formal math background but it is really helping me understand what is going on. Looking forward to finishing this course then moving forward to a course specifically on deep learning.


Octave isn't widely used in industry for ML. Python is.


Andrew says in one of the video that before using python, it is recommended to get the model right first using matlab or octave.


This raises an interesting question about MOOCs for me. Several people here are objected to violating the terms of a free online course. At what point is it ok to start creating derivative works? I've noticed many of the comments discuss etiquette or ethics "what's right is right", rather than legality. The whole question is interesting to me.

I actually do think that one of the drawbacks of Andrew Ng's course is that it uses octave rather than python. My point here isn't to kick off another debate about this topic - there have been plenty of those already. Rather, let's start with the assumption that it is reasonable for someone to feel that the course is brilliant, but would be improved by the option to do the assignments in python. As it is acceptable by the terms of the site to audit the class for free (no credit is given), many people have chosen to quietly do the exercise on their own in python.

At some point, they may want to get together to share, discuss, correct, and debate their solutions - and for these discussions to happen properly, this must involve sharing code. A lot of good could emerge from something like this.

I suppose you could say "then create your own course", but that comes with some issues of its own. First, the course is a classic - it was one of most famous early MOOCs, and it is a seminal course in machine learning generally. Under certain rules, it's ok to create derivative works of art from the public domain, and it's even ok to create derivative works of art from copyrighted material, provided you follow certain restrictions and abide by a (fairly complicated, inanal) set of royalty sharing regulations.

This is just a thesis, and I'm sorting it through mentally, so I don't want to come off as pushing any particular solution or angle here... but I am leaning toward the notion that 1) original content creators for online courses need to be credited, and in some cases paid, for their work, and 2) restrictions on creating derivative works from these courses may be very harmful, especially if they get to the point where simply re-implenting things in a different language and sharing the solutions (in ways that are essential for meaningful discussion) is disallowed legally or through etiquette or custom.

Well, that's about it, I'd be interested in hearing thoughts on this.

NOTE: I do want to be clear, this is a general question prompted by this discussion - the site in question is not a place where people post and share solutions to problems for a coursera course.


While I don't think that posting solutions or using them is the right thing to do I'm grateful to the author for mentioning the course — it's fantastic!


Is Andrew Ng still personally teaching this course?


He's the only one listed on the instructor section.


Yes


i'm really new to programming and currently on my first week of a 16 week full stack web dev boot camp. as someone still wrapping their head around breaking problems into smaller chunks, would y'all recommend andrew ng's courses?

i'm coming from teaching elementary school, so my math skills aren't all that advanced :o)


I say just do your full stack program really well and stay in that track for a bit. You'll have plenty of time to learn other things after. Coding is a never ending journey!


Definitely don’t overwhelm yourself. Your effort isn’t going to be useful unless you build good software engineering chops/fundamentals. ML isn’t widely used enough to make or break your career.


I imagine it would be pretty hard. If you take it slow and learn the details as you go though I don't see why not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: