LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   General comments on the course (http://book.caltech.edu/bookforum/forumdisplay.php?f=140)
-   -   Languages used (http://book.caltech.edu/bookforum/showthread.php?t=915)

Andrs 09-14-2012 01:47 AM

Re: Languages used poll
 
Quote:

Originally Posted by anachesa (Post 4514)
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.

alternate 01-15-2013 11:47 PM

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++.)

ilya239 02-13-2013 02:28 PM

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.

melipone 03-08-2013 03:24 PM

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.

Haowen 03-17-2013 06:52 PM

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.

Anne Paulson 03-18-2013 10:49 PM

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.

Sendai 03-19-2013 07:13 AM

Re: Languages used
 
Quote:

Originally Posted by melipone (Post 9830)
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.

kirill 03-19-2013 02:45 PM

Re: Languages used
 
I used R for programming, it was fun!

Suhas Patil 03-20-2013 11:16 AM

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.

ilya19 03-21-2013 10:15 AM

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.


All times are GMT -7. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, 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.