LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > General comments on the course

View Poll Results: Which language(s) have you used for homework here?
Matlab or Octave 11 37.93%
S or R 6 20.69%
Python 15 51.72%
Perl 0 0%
C 0 0%
Java 1 3.45%
C++ 2 6.90%
Mathematica 1 3.45%
Fortran 0 0%
Other (awk, PL/I, Pascal, Forth, APL, etc.) 2 6.90%
Multiple Choice Poll. Voters: 29. You may not vote on this poll

Thread Tools Display Modes
Old 09-14-2012, 01:47 AM
Andrs Andrs is offline
Join Date: Jul 2012
Posts: 47
Default Re: Languages used poll

Originally Posted by anachesa View Post
IMO Python is fine for relatively quick prototyping, but not for the serious data processing. High cost of function calls and quick stack overflow if you use recursion are the main problems I have with Python. It's just much slower than C++ or Java. Try to write recursive depth-search in Python and in C++, it is very educational.

Haven't used R yet, so no opinion there...
I think people have different opinions about different languages. Python may not be suitable in all applications, but I think that in general Python can indeed be used in "serious" programming with large data sets . Of course, depending upon how you write a program you may get poor performance/hit the limits using any programming language.
My experience is that Python is a powerfull lang with a large number of libraries for scientific applications that are very fast in handling large amount of data. Examples of some "fast packges for python" are: numpy that supports efficient handling of very large matrix/arrays (including statistics functions) and scikit_learn that supports machine learn.
Reply With Quote
Old 01-15-2013, 11:47 PM
alternate alternate is offline
Join Date: Jan 2013
Posts: 14
Default Re: Languages used

I have used Haskell for the exercises so far, as it's the main language I've experimented with previously.

I have a little concern that if I end up needing help with something, it may be unfamiliar for others to interpret, and similarly I have no experience with Python (although I do with C++.)
Reply With Quote
Old 02-13-2013, 02:28 PM
ilya239 ilya239 is offline
Senior Member
Join Date: Jul 2012
Posts: 58
Default Re: Languages used

I'm using Python; but also, the Emacs Org Mode -- a system for writing "live" text documents that can include LaTeX as well as executable chunks of code.
More info at http://www.jstatsoft.org/v46/i03 . I'll eventually post a better description, but basically this lets you write up a document that intermingles discussion (including LaTeX) and executable code, and can export the document so that both the code and results of its execution are included in the export.
Reply With Quote
Old 03-08-2013, 03:24 PM
melipone melipone is offline
Senior Member
Join Date: Jan 2013
Posts: 72
Default Re: Languages used

I am using Clojure. Anybody else? I had however to write a script to use Octave for the quadratic programming package for SVMs. I don't think Incanter has something like that. Lemme know.
Reply With Quote
Old 03-17-2013, 06:52 PM
Haowen Haowen is offline
Join Date: Jan 2013
Posts: 24
Default Re: Languages used

Now that I have completed the course (03/2013) I can say that R can be used quite nicely to solve all the homeworks.

One word of advice I'd like to give future students when using packages to solve homeworks is that if you don't know exactly what the package is doing then you should consider using a lower level function call or package - you'll get more accurate answers and learn more in the practice as well. For example, I generally got fewer errors using the QP function of kernlab to solve my SVMs than if I used the svm function itself; and at one point I got greedy and used a built-in cross-validation mechanism instead of implementing one myself and totally bombed out on several questions in the homework.
Reply With Quote
Old 03-18-2013, 10:49 PM
Anne Paulson Anne Paulson is offline
Senior Member
Join Date: Jan 2013
Location: Silicon Valley
Posts: 52
Default Re: Languages used

I agree with Haowen, both on the suitability of R and the necessity of using lower-level functions rather than builtins. Using R allows you to visualize what you're doing, which for a number of homework problems is invaluable in debugging.
Reply With Quote
Old 03-19-2013, 07:13 AM
Sendai Sendai is offline
Join Date: Jan 2013
Location: Minnesota
Posts: 29
Default Re: Languages used

Originally Posted by melipone View Post
I am using Clojure. Anybody else?
I strongly considered it, but ended up going with Python. Python + numpy + scikit-learn turned out to be a great platform for this course.

If I had time, I'd go back and do the homeworks again in Clojure.
Reply With Quote
Old 03-19-2013, 02:45 PM
kirill kirill is offline
Join Date: Jan 2013
Posts: 14
Default Re: Languages used

I used R for programming, it was fun!
Reply With Quote
Old 03-20-2013, 11:16 AM
Suhas Patil Suhas Patil is offline
Senior Member
Join Date: Dec 2012
Posts: 57
Default Re: Languages used

I used Octave for all the exercises except SVM. For SVM I compiled svm.cpp and .h and called it's APIs from C++. I've been working in C++ for many years so it was not too hard but for the RBF problem I had to implement matrix multiplication, inverse and transpose operations. For that I used IPP (Intel Performance Primitives library for matrix operations).
I thought C++ programs were faster. For example, I could run problem 18 from final 1,000,000 times overnight with 1,000 points in the training set and 10,000 points in the test set for each iteration. Again I don't have any other reference to compare with. Also not sure if anybody tried with larger number of iterations.
I am curious to look at R as lot of people have suggested it. I learned Octave just few months back when I had taken Prof. Andrew's ML course. I thought it was friendly for doing the matrix operations that we have to do in C/C++ the hard way.
Reply With Quote
Old 03-21-2013, 10:15 AM
ilya19 ilya19 is offline
Junior Member
Join Date: Feb 2013
Location: Montreal, Canada
Posts: 7
Default Re: Languages used

Using C++. It is efficient and allows running extensive tests with relatively low cost (processing time). C++ is also convenient for organization of the code and for debugging.
In rare cases, when I had to use quadporg of MATLAB, I called MATLAB functions from C++ using MATLAB engine. This was not trivial in the first time, but once you have done it, there is not a problem to incorporate MATLAB anywhere you need.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 07:18 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.