7 ms·
Machine Learning Exercises in Python, Part 1
- danjoc 10y agohttps://www.coursera.org/about/terms/honorcode https://www.coursera.org/about/terms/honorcode I will not make solutions to homework, quizzes, exams, projects, and other assignments available to anyone else (except to the extent an assignment explicitly permits sharing solutions). This includes both solutions written by me, as well as any solutions provided by the course staff or others.
- minimaxir 10y agoThe course itself uses Octave; the OP just ported the code to Python.
- SilasX 10y agoFrom what I remember of the course, it was itself mostly "porting" code (well, formulas) from the textbook to Octave/Matlab.
- mastazi 10y agoYes and Octave/Matlab is not that far from "standard" mathematical notation anyway... But the exercises were still useful as they helped me remembering the concepts.
- jdwittenauer 10y agoNone of the material in these posts could be used directly to complete assignments for the class. I suppose someone could attempt to "back-port" some of the Python code to Octave, but if you're going to that much trouble it's probably easier to just solve it in Octave in the first place.
- tyrael71 10y agoThese are direct solutions to the exercises. I took the class some time ago and also did it in python.
- mastazi 10y agoAs far as I can remember you can't submit assignments in Python, can you? Or maybe you did it in Python first, and then ported in Octave before submitting? If so, how did it work out for you? At first I thought I wanted to go down the same path (because I'm comfortable with Python but not with Octave) but then concluded it was too much trouble backporting everything.
- deleted 10y ago[deleted]
- mindcrime 10y agoAs far as I can remember you can't submit assignments in Python, can you? When I took the class earlier this year, the answer was - effectively - "no". I mean, yeah, you could do some trickery with calling Python from Octave using whatever FFI Octave has, or you could possibly reverse engineer the protocol they use to talk from your code to the upstream server... but anybody doing all that would be doing more work that just completing the assignments in Octave to begin with.
- tylerhou 10y agoThere exist implementations of an interface between Python and the Coursera grading server. https://github.com/mstampfer/Coursera-Stanford-ML-Python https://github.com/mstampfer/Coursera-Stanford-ML-Python is an example.
- mindcrime 10y agoOf course somebody would have reverse engineered the protocol already. Oh well. I still think most people would find it easier to just do the assignments themselves than deal with all this, but I'll grant that there's "always one in every crowd" as they say.
- jamra 10y agoThey were supposed to be free so they blinked first
- fitzwatermellow 10y agoDuring the time of the original class, I don't think scikit-learn and spark were quite as mature. But perhaps Octave still enjoys a certain prominance in academic machine learning research. Matlab was also used for the recent EdX SynthBio class. And it just feels a bit archaic now, doing science in a gui on the desktop, instead of on a cloud server via cli ;)
- mark_l_watson 10y agoVery nice. I took the class twice and think it is easiest to use Octave, but for after taking the class these Python examples might help some people.
- Animats 10y agoI took that course from the pre-Coursera Stanford videos, when someone from Black Rock Capital taught the course at Hacker Dojo. Did the homework in Octave, although it was intended to be done in Matlab. It was painful. Those videos are just Ng at a physical chalkboard, with marginally legible writing. All math, little motivation, and, in particular, few graphics, although most of the concepts have a graphical representation.
- capkutay 10y agoAgreed. Though this is pretty consistent with college CS/Math courses in general (at least in my experience). A lot of dense theoretical content covered in scribbles and slides. You don't really learn anything until you just do practice problems or research the same topics independently.
- nostrebored 10y agoYou're right -- the class is intended to be a primer for your learning or, ideally, something you come into having already read about the material ready to gain insights.
- deleted 10y ago[deleted]
- tnecniv 10y ago> You don't really learn anything until you just do practice problems or research the same topics independently. This is to be expected. As my Linear Systems textbook says, "math is a contact sport."
- aptwebapps 10y agoThe current Coursera course's videos are pretty unadorned, but he's not using a physical chalkboard any more. I also found that for most of them I can use the subtitles instead of the audio and play them back about about 2x speed.
- ivan_ah 10y agoRelated, the demos from Kevin P. Murphy's excellent ML book implemented in Octave [1] and (partially) in Python[2]. [1] https://github.com/probml/pmtk3/tree/master/demos https://github.com/probml/pmtk3/tree/master/demos [2] https://github.com/probml/pmtk3/tree/master/python/demos https://github.com/probml/pmtk3/tree/master/python/demos
- motyar 10y agoCan I find same in R?
- Noseshine 10y agoTry https://www.edx.org/course/applied-machine-learning-microsoft-dat203-3x https://www.edx.org/course/applied-machine-learning-microsof... https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/about https://lagunita.stanford.edu/courses/HumanitiesSciences/Sta... > This is not a math-heavy class, so we try and describe the methods without heavy reliance on formulas and complex mathematics. We focus on what we consider to be the important elements of modern data analysis. Computing is done in R. There are lectures devoted to R, giving tutorials from the ground up, and progressing with more detailed sessions that implement the techniques in each chapter.
- jupiter90000 10y agoOften this sort of material seems to be a collection of methods and understanding them, which is obviously important to being able to use them. However, I usually feel like the example problems are much cleaner and simpler than those I've encountered in business. I feel like there's this missing link between learning the methods and doing something that actually adds significant value for a business using machine learning. Perhaps it's just me or my field though. I found that usually lots of work involved just transforming or examining data in relatively simple ways or using human expert decisions as to important threshholds for outliers. For example I could run an outlier algorithm on data and either the returned outliers were very obvious and could have been found using a manual query by knowing the business context, or it returned alot of false positive outliers that were useless for the business. Other times, we'd have a predictive model that was good for 95% of cases but would make our company look ridiculous on predictions for the other 5%, so couldn't use it in production-- and the nature of the data was such that we couldn't use the model for only certain value ranges. Perhaps it was just the nature of our realm of business (telecom), and these approaches are more useful for others (advertising, stock trading, etc). Any experience with business fields where this stuff made a sizable impact for something they productionized in business they can share?
- shamino 10y agoChiming in to say that I have the same exact experience :) I work in security, and we use these methods to detect anomalies or classify malicious content or URLs. A silly false positive is embarrassing, even if it happens once. Humans always augment our methods, or we have to set expectations to the customer that we are trading off accuracy for speed. Fast customer support usually helps against false positives too.
- thewhitetulip 10y agoYes, augmenting machine intelligence with human intuition is great because machines yet haven't got human intuition which we can't program.
- leereeves 10y agoThese are just introductory courses, teaching the theory. Teaching best practices for applying these methods to particular fields is probably beyond the expertise of any one person. Perhaps there's an opportunity for professors or practitioners of each field here?
- denfromufa 10y agoWhat is the best learning resource for gaussian process (kriging) using Python?
- 0xmohit 10y agoHave you seen Gaussian Processes for Machine Learning [0]? The entire text is freely available online at the mentioned URL. [0] http://www.gaussianprocess.org/gpml/ http://www.gaussianprocess.org/gpml/
- denfromufa 10y agoThat is classical resource for GP, but using Matlab. I'm looking for something practical using Python.
- 0xmohit 10y agoI haven't used it, but you may want to explore GPy [0] if you haven't already. [0] https://github.com/SheffieldML/GPy https://github.com/SheffieldML/GPy
- denfromufa 10y agoI never understood what is the difference between GPy and GP in sklearn. I'm using the latter, but still do not understand most of parameters that go into this model.
- earthpalm 10y agoLets talk about about how much Michael I. Jordon taught Andrew Ng what he knows about machine learning and AI.
- jjallen 10y agoSeems like to compensate for day to day weight/water fluctuations one would need to track the trailing activity and food data for a period of days prior to the data analyzed. I'm thinking 3-5. .2 lbs/kilos lost is mostly a rounding error. Our weight could fluctuate that much on a daily basis from the amount of salt consumed.
- Noseshine 10y agoI think you clicked on the wrong thread, you probably wanted to post here: > Machine Learning and Ketosis https://news.ycombinator.com/item?id=12279415 https://news.ycombinator.com/item?id=12279415
- NelsonMinar 10y agoNg's machine learning class is excellent, but the main thing holding it back is its use of Matlab/Octave for the exercises. A Python version (with auto-grading of exercises) would be a huge improvement.