
Coursera Machine Learning MOOC by Andrew Ng – Python Programming Assignments - sonabinu
https://github.com/dibgerge/ml-coursera-python-assignments
======
liangd
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.

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

------
stygiansonic
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!

------
alistproducer2
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.

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

~~~
TeMPOraL
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.

~~~
naveen99
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)

~~~
gmadsen
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

~~~
choonway
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.

~~~
gmadsen
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

------
asaph
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...](https://learner.coursera.help/hc/en-
us/articles/209818863-Coursera-Honor-Code)

~~~
unixhero
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!

~~~
asaph
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...](https://learner.coursera.help/hc/en-
us/articles/209818863-Coursera-Honor-Code)

~~~
unixhero
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.

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

~~~
gmadsen
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

------
xrayzerone
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?

------
Treegarden
"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.

~~~
adam12
[https://github.com/dibgerge/ml-coursera-python-
assignments/s...](https://github.com/dibgerge/ml-coursera-python-
assignments/search?q=YOUR+CODE+HERE&unscoped_q=YOUR+CODE+HERE)

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

------
choonway
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.

~~~
jrib
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.

------
id_rsa
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.

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

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

------
geebee
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.

------
ikido
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!

------
threatofrain
Is Andrew Ng still personally teaching this course?

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

------
zfigz
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)

~~~
leesec
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!

