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)

gah44 07-25-2012 06:44 AM

Languages used
I was just wondering what languages different people use.

I don't yet know how poll works, but I will try to do one.

(OK, don't reply to this one. I will do another with better choices.)

tzs29970 07-25-2012 11:58 AM

Re: Languages used
Python is widely used in scientific computing. It should be on the list. Omitting it means you are going to get a lot of "other".

Mathematica probably should be there, too.

PL/1 is an odd inclusion. It is most widely know for business programming, and never really took off outside of mainframes.

APL would be good for the kind of things needed for this class (at least so far).

gah44 07-25-2012 03:03 PM

Re: Languages used
I could start a new one. I don't know how to delete one, though.

There is a maximum of 10 choices, which you have to specify
before specifying the choices. I could remove PL/I and add python.

Other than I did HW1 in awk, I could also remove that.

By the way, why 29970?

fgpancorbo 07-25-2012 03:30 PM

Re: Languages used
Definitely MATLAB. I got addicted to it during grad school and it's hard to get used to something else, especially for scientific computing. I haven't used Octave since I have my own MATLAB license.

gah44 07-25-2012 03:35 PM

Languages used poll
This is a poll of languages used in solving homework problems where programming is required. It is intended to replace the one in the Homework 2 section.

You may choose more than one.

gah44 07-25-2012 03:47 PM

Re: Languages used
Thanks to all who have replied.

After some comments about choices, and because this is probably not the best place, I have reposted the poll in http://book.caltech.edu/bookforum/fo...play.php?f=140

(This was my first try at a poll.)

jerrytsai 07-28-2012 08:37 AM

Re: Languages used poll
Right now, I'm the only person reporting using R, which I am trying to learn, to substitute for my longtime usage of SAS.

Having taken Professor Ng's Machine Learning course on Coursera, I learned Octave (Matlab-like freeware), which I was using on Windows. I decided to work on this course-- Learning from Data-- on OS X and was preparing to install Octave when I decided to see which software packages are the most popular for machine learning.

After some exploration I found this interesting chart: Kagglers Favorite Tools

I then decided to jump into R (I have had considerable training in statistics, and was exposed to R during that training, but have been able to accomplish basically everything I ever needed to do with SAS.) Because I left myself not enough time, I had to use Octave to do the first problem set, but after the submission deadline I re-did it using R. I also used R to do the second problem set and plan to use it for the remainder of this course.

As a statistician, using R makes sense, because of the wealth of statistical tools it has. I have been trying to migrate to R from SAS for some time, and this course is a great MacGuffin to do so.

I decided to post about this decision-making in case anybody else was wondering about which software package to use and was wondering how we each chose the package we are using.

My longtime usage of SAS locked me in to that package for years, so the languages we choose to use initially often become the languages we use indefinitely. I am trying to reboot my choices by learning to use R for data analysis, Python for data processing, while only dabbling with Matlab/Octave.

However, as sets of data ever grow larger every day, I wonder which software package is (or will be) the fastest/most efficient. The amount of time a developer takes to construct an algorithm matters, but as N goes toward infinity, so does the amount of time the computer takes to implement that algorithm.

tsukisan 08-07-2012 01:29 AM

Re: Languages used
I used Mathematica ver 8. Really easy create code and visualize plots.

ghuiber 08-23-2012 10:57 PM

Re: Languages used
Mata. It's the matrix language embedded in Stata. See http://www.ssc.wisc.edu/sscc/pubs/4-26.htm for a nice intro.

anachesa 08-27-2012 06:52 PM

Re: Languages used poll
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...

Andrs 09-14-2012 01:47 AM

Re: Languages used poll

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

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.

Elroch 04-06-2013 08:17 AM

Re: Languages used
In week 1 of the course I have only used R.

I'm slightly surprised that this appears to be used so much less than Octave and Python: perhaps it's a consequence of the background of participants?

[I was amused to see Forth on the list. Reminds me I once bought a compiler for this on my Spectrum. I don't anticipate using it here. :) ]

Michal Lewicki 04-07-2013 02:44 PM

Re: Languages used
just R

vpcom 04-23-2013 09:20 AM

Re: Exercises and Problems
hi all,

I know about programming and also about matlab but I want a way that learn things that I need for this class (MA) very quickly. please if you know a way e.g. a book or a site that I can used for this class and for this practice, please tell me more. I appreciated your help.

thank you so much
Dr. yaser Abu Mostafa

Michael Reach 05-08-2013 02:24 PM

Re: Languages used
Just R

PaulN 05-09-2013 06:34 PM

Re: Languages used
I'm using Python with numpy (for Matrix handling). I typically program in Java or C but, in this case, I found Python easier to deal with, by being succinct and allowing to concentrate on the algorithms rather than on the language.

Even if it's an interpreted language, I found Python plenty fast within the context of this class.

The only thing to be aware is that, at least on the Mac, installing the right version of Python, with the right version of numpy, is a slow/tedious process which can take a couple of hours.

All times are GMT -7. The time now is 07:48 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.