Popular Linear Algebra MOOC switches from IPython to MATLAB

January 27th, 2015 | Categories: Linear Algebra, matlab, programming, python | Tags:

Linear Algebra – Foundations to Frontiers (or LAFF to its friends) is a popular, high quality and free MOOC that, as the title suggests, teaches aspects of linear algebra in a way that takes the student from the very basics through to some cutting edge techniques. I worked through much of it last year and thoroughly enjoyed the approach it took — focusing on programming aspects from the very beginning. The course authors are also among the developers of the FLAME project, a high performance linear algebra library, and one of the interesting aspects of the LAFF course (for me at least) was that it taught linear algebra in a way that also allowed you to understand the approaches used in the algorithms behind FLAME.

Last year, all of the programming assignments in LAFF were done in Python, making use of the IPython notebook. This year, the software stack will be different and will be based on MATLAB. I understand that everyone who signs up to LAFF will be able to get a free MATLAB license from Mathworks for the duration of the course. Understandably, this caused quite a bit of discussion between the LAFF team and software/language geeks like me. In a recent Facebook thread, I asked about the switch and received the reply

‘MATLAB will be free during the course. There are open source equivalents, but Mathworks staff is supporting the use of MATLAB (staff for us). There were some who never got the IPython notebooks to work properly. We are really excited at the opportunity to innovate again and perhaps clear up snags in the programming issues we had. It was complicated to support IPython on all of the operating systems and machines that participants use. MATLAB promises to be easier and will allow us again to concentrate on the Linear Algebra’ – LAFF UTx

I’m sufficiently interested in this change from IPython to MATLAB that I’ll be signing up for the course again this year and I encourage you to do the same — I believe that the programming-centric teaching approach taken by LAFF is extremely well done and your time would be well-spent working through the course.

The course starts on 28th January 2015 so sign up now!

Here’s the trailer for last year’s course.

  1. January 27th, 2015 at 18:58
    Reply | Quote | #1

    Someone should have shared https://tmpnb.org with them. How could this be hard to support across all platforms? Have a web browser?

  2. David
    January 28th, 2015 at 03:43
    Reply | Quote | #2

    Yeah, except jupyter didn’t exist when the course was offered the first time, it just came out recently, and although the users might just need a web browser, it is not that simple to develop and maintain an infrastructure that supports thousands of users. Besides, there are people who do not have access to the internet 24/7, so a local version of the software still needs to be an option.

  3. martin cohen
    January 28th, 2015 at 04:30
    Reply | Quote | #3

    THe trouble with this approach is if the student wants to continue their explorations into linear algebra after the course is over. If they can not afford Matlab, what are they to do?

    I hope that the course is compatible with Octave, the free Matlab look-alike. Otherwise, I intensely dislike this approach.

  4. January 28th, 2015 at 14:20
    Reply | Quote | #4

    I think one of the key point is that mathworks guys will be supporting them. I will be the first to agree that IPython might not have been easy to install. But since Conda is around, I must say that this has become a non-issue during the last year.

    Depending on the support Mathworks is giving to the MOOC, it will be difficult to compete, and some people start to raise the possibility that mathwork start to be scared of open-source free project that compete so are trying as much as they can to lock people in their environment as early as possible.

    Anyway I think we (the IPython team) thank LAFF for trying the notebook, and we hope they will reconsider at a later point (side note, matlab works with the notebook if the environment was great). And as teaching is one of the most important goal, I believe that if you made the choice to switch back to matlab for the time being it is for the sake of the student, so it is the right decision.

    Story like this one should definitively not used to argue notebook/python… etc would have been better than Matlab, but to fix the problem encountered by users. So back to work, let go simplify installation, documentation example and raise some funds for Open Source in general.

    We would be happy to get feedback if you re-do the mooc on what’s better when using matlab !

  5. Robert van de Geijn
    January 28th, 2015 at 15:43
    Reply | Quote | #5

    Let me comment a bit on this.

    Last year, we had a very energetic and talented undergraduate, David, who put what is essentially a complete package together, we call it the “laff app”, that incorporated everything one needed to run IPython Notebooks. To do so, he created packages for three different platforms (Windows, Linux, and OSX), and for each of those he had two solutions: one that was a “native” solution and one that that used a virtual machine. And then, on top of that for those who still had trouble, he created a version that ran in the cloud. This was a colossal effort that caused quite a bit of anxiety as we approach launch date.

    Now, this also generated an enormous amount on a discussion board for the edX class. Given that the discussion board is very poorly designed, things quickly got out of hand. I think we lost participant, but were left with a core set of participants who then fell in love with IPython Notebooks. This solution is still part of our “stand alone” release of the course, which is available from http://www.ulaff.net with a “pick your pay” model of purchase (including the option not to pay).

    Given that we are rerunning the course with a skeleton crew, we decided that MATLAB was the simpler route this time. Given that MathWorks is making MATLAB available for free, I think everyone wins: the participants get to experience a world class tool and can then make their own decision of whether to embrace open source software.

    I think you should try the “laff app”: http://ulaff.github.io/pages/download-software.html

    David is graduating this semester, and I will be auctioning him off on Ebay later…

    Thanks for your interest and kind words. IPython Notebooks are really cool. (Python itself is a bit quirky, imho.)

  6. David
    January 28th, 2015 at 18:27
    Reply | Quote | #6

    martin cohen :THe trouble with this approach is if the student wants to continue their explorations into linear algebra after the course is over. If they can not afford Matlab, what are they to do?
    I hope that the course is compatible with Octave, the free Matlab look-alike. Otherwise, I intensely dislike this approach.

    As Robert mentioned, one option would be the “laff app”, but also running the code provided in the course with Octave shouldn’t be a problem.

    Matthias :
    So back to work, let go simplify installation, documentation example and raise some funds for Open Source in general.

    I agree, and I hope I have contributed towards that. The idea was to make it as as easy as downloading, extracting, and running the notebooks on any platform regardless of the student’s level of technical know-how. Conda was instrumental to achieve this zero-install approach, but there is always going to be someone running into some kind of trouble. I think it still needs some more documentation, but here’s the repo https://github.com/ULAFF if you are interested in looking around.

  7. Martin Cohen
    January 28th, 2015 at 20:33
    Reply | Quote | #7

    @Robert van de Geijn

    What happens to the Matlab that the students are using after the course is over? Will it be shut off?

    How well would Octave work for the course?

  8. January 30th, 2015 at 06:18
    Reply | Quote | #8

    @Robert van de Geijn

    Hi Robert,

    Would love to see David apply to Continuum Analytics. I suspect we could have helped you get things configured for your MOOC, but I can understand using Matlab’s tech support at this point.

    I would love to hear about the problems you had. binstar.org should really help with this sort of thing now — you can easily define and share entire environments that can work cross-platform. But, testing is always something that is needed more — and a commercial vendor can provide that. Congrats on teaching the course and good luck with it. The world needs more people who understand linear algebra.

  9. Stu Blair
    January 30th, 2015 at 19:47
    Reply | Quote | #9

    I’m torn.

    The good side is that students will get a chance to learn about linear algebra and a chance to build programming skills. I think those are both sufficient benefits even though (presumably) they will lose access to the MATLAB platform when the course is done; they will still gain skills that are portable across languages.

    On the other hand – I’m surprised that they’ve thrown in the towel on using Python. Other edX MOOCs with complicated software stacks have overcome cross-platform issues before. I think my favorite (probably because I’m not the one who had to make it happen) was UC Berkeley’s Software as a Service series where students learned to write web apps with Ruby on Rails. They did this using VirtualBox and an Ubuntu image that every student simply had to learn. (another bonus learning opportunity)

    Still — that’s not easy and I have a ton of respect for the LAFF folks so I’ll leave it at that. Despite the drawbacks they’re still doing a great thing for students.

  10. January 30th, 2015 at 23:39

    @Travis Oliphant
    It sounds like the first bid has been placed.

  11. January 30th, 2015 at 23:42

    We have by no means thrown in the towel. The IPython Notebook solution is robust and available. We just decided to try something else. Our LaTeX source for the altered notes that we use this spring can with the switch of a boolean generate the Python version of the book.

    Choice is a good thing. If Python is the way to go, it will win in the end.

    @Stu Blair

    @Martin Cohen

  12. January 31st, 2015 at 05:25

    @Robert: long time no see! First, let me echo what Matthias and Travis said. Your first priority is to teach your students, and python, IPython and matlab are just tools towards that goal. I’m as much of a python zealot as you’ll encounter, but education and mathematics still come first :)

    Having said that, our own machinery (Jupyter), together with Conda/Andaconda/Binstar, has also progressed a lot. Between the expertise in our team and Continuum’s work, I’m sure we could help out, if in the future you’d like to revisit the question.

    Furthermore, it’s worth highlighting (Matthias mentioned it, but just in passing) the native Matlab support we now have in Jupyter thanks to Ariel Rokem: https://github.com/arokem/python-matlab-bridge.

    Finally, David: if by chance you don’t want to stay in Austin and go to Continuum, get in touch! We might have options around the Jupyter project itself :)

    Mike, thanks a lot for this discussion!

  13. David Ketcheson
    January 31st, 2015 at 14:22

    Implicit in this whole conversation is the fact that switching from Python to MATLAB is newsworthy since there is a strong current of people switching from MATLAB to Python.

    In my own courses, I’ve had a painless experience using IPython notebooks on Sagemathcloud. But I never imagined the issue of teaching students who don’t have ubiquitous internet access. Seems crazy that someone would have access to a MATLAB license but not to the internet.

  14. Robert van de Geijn
    January 31st, 2015 at 15:18

    @Fernando Perez

    Hi Fernando. Seems like there are quite a few people on this blog who have stumbled over me at some point.

    What I really want is a generic “IPython Notebook” environment where people can easily plug in their own language. David showed me how he can plug Octave in so that the coding in the executable boxes can be M-script. Perhaps what you mention above about Matlab can help with that.

    A little project David is now working on with another student is a IPython Notebook that steps people through the exercise of optimizing dgemm in C, but with the whole testing harness and graphing of the performance embedded (or expressed or encapsulated or whatever you would like to call it) in the IPython Notebook. Combine this with his laff app, and one would have a really valuable pedagogical exercise to teach people about high performance.

    So, clearly, we have not given up on Python.

  15. January 31st, 2015 at 22:07

    This is disheartening to me for a few reasons.

    1) I don’t like when the conversation on MOOCs gets distorted by the fixation with numbers of participants enrolled or completing, and I can’t help but get the feeling that this decision was influenced by the fear of “losing people.” I just had an exchange on Twitter in regards to this blog post, and got the reply “even the *command line* is a no-go for incredibly intelligent [people].” So you’ll lose the people who won’t learn to open a terminal and do ‘cd’ to navigate to a folder or ‘conda update conda’ to update their Python stack. Is that so bad? Should we change our curricular choices to keep them?

    2) Matlab is a commercial product, and an expensive one, and I have a distaste for using my professorial position to push such a product, there being perfectly good free alternatives. That’s why I will never, ever require my students to purchase a textbook. At $200+ a pop, it feels unconscionable to force it on them. When we’re involved in open education on the web, it’s a contradiction to me that the tools used be commercial and expensive. Make no mistake: Matlab sees this as a promotional campaign. They will get thousands of eyes on their product and essentially only give an extended demo period for the duration of the course. (Some companies are even hosting their own MOOCs as part of their content strategy.)

    3) This is a course in linear algebra, and Matlab is a domain-specific language for linear algebra, so it’s an ideal match for Mathworks. But in terms of transferable programming skills, I feel strongly that Python is a superior choice for education. I’ve touted this before, of course:
    http://lorenabarba.com/blog/why-i-push-for-python/
    So it feels like a step backwards to abandon the already developed course materials using a real programming language, and invest time revising the course to use Matlab. That time could have gone into giving the existing Python version a review. (I suspect that the instructors may not have adopted Python in their own daily work, and instead use Matlab regularly. That would explain that the loss of one TA could precipitate this switch.)

    4) I think that the C in MOOC should represent ‘community’ instead of ‘course’ and Python users are an active and welcoming community. I see my own ‘do-it-yourself’ MOOC on numerical methods as an always-on, self-paced, extensible course and hope that it will build community. Certainly, the infectious enthusiasm of Python aficionados helps with that. It seems a shame that LAFF would move away from the Python cosmos.

  16. Mike Croucher
    February 1st, 2015 at 12:07

    @Robert van de Geijn

    David’s dgemm notebook sounds great! Is it an extension of this article? http://apfel.mathematik.uni-ulm.de/~lehn/sghpc/gemm/index.html I think I originally found that from LAFF.

  17. February 2nd, 2015 at 00:38

    Hi @Robert!

    ask and ye shall receive…

    http://try.jupyter.org

    That’s a demo of the upcoming IPython, now renamed to Jupyter (http://jupyter.org) notebook server, with multi-kernel support. The demo currently runs by default Python, Julia and R, but there are over 25 other kernel implementations out there, including native Matlab and Octave: https://github.com/ipython/ipython/wiki/IPython%20kernels%20for%20other%20languages

    Hope this is useful!

  18. February 2nd, 2015 at 19:40

    @Lorena A. Barba

    1) You are dead wrong. It had nothing to do with a fear of loosing people. People liked the IPython Notebook solution. It had everything to do with us being academics. We like to give people choices and we like to tinker and try out different things.

    2) I think you are also dead wrong on this one. First, a student version of Matlab is $50. Seconds, it is a professional tool that the participants get to try for free. I don’t see how anyone looses, given that in the end they can still use the IPython Notebook solution or switch to Octave.

    3) You are dead wrong on this one as well. We make it very clear that this is NOT a course that teaches how to program, and hence there is no expectation of transferable skills when it comes to programming

    4) You can want “C” in MOOC to mean anything you want. But in the end it is about the course, not the community. And there are many communities built around Matlab as well.

    Finally: I keep trying make clear that we are not moving away from the Python cosmos. We are simply trying to teach a course.

    (I am Dutch and express myself very bluntly. So, don’t read anything into the bluntness of this message. It is a means for communicating directly.)

  19. February 2nd, 2015 at 19:47

    @Mike Croucher
    Yes. I have a similar wikipage to the one in Germany that walks people through the optimizations.

  20. February 2nd, 2015 at 19:48

    @Fernando Perez
    Very nice. I’ll have David look at it.

  21. February 2nd, 2015 at 23:00

    @david, good luck for this semester, I’ll try to have a look

    @Robert

    as @Fernando said, we are indeed trying to make the notebook format universal and not python specific. Just today we got 2 new kernels (Javascript and apparently native matlab one) added to the list. The fact that people still refer to Notebook as IPython notebook is one of the sources of confusions and is one of the reason we “Rename” to Jupyter. We also want to encourage people to contribute be separating each pieces regardeless of the language.

    We also have started project like nbgrader (https://github.com/jupyter/nbgrader) that distribute assignment as notebook and autograde as much as possible. We strive to make the framework not python specific so that you could use it if needed.

    I want to think of Jupyter/IPython protocol as USB-for-REPL. Plug anything, with anything and it works.
    It is a not well known fact but vim, emacs, atom and sublime can be used instead of repl. Some support even rich display capability. Storing notebook can be done on google drive, or postgress…etc etc.

  22. Robert van de Geijn
    February 4th, 2015 at 04:08

    @Matthias
    It would be interesting to take our course ware and use nbgrader for the homeworks. That could work very nicely. Perhaps a summer project.

  23. martin cohen
    February 11th, 2015 at 05:28

    This is a little late, but I just saw this in NA Digest:

    http://www.ti3.tu-harburg.de/intlab/

    INTLAB – INTerval LABoratory

    The Matlab toolbox for Reliable Computing

    Now also for Octave!