5 ms·
For anyone interested this seems to be the code (written in Matlab) that they used to get their results: https://github.com/brendenlake/BPL https://github.com/
by orbifold 11y ago
For anyone interested this seems to be the code (written in Matlab) that they used to get their results:
https://github.com/brendenlake/BPL https://github.com/brendenlake/BPL
- bronz 11y agoWhy do you think they wrote it in Matlab?
- chucksmash 11y agoI assume the first paragraph of the README: > Matlab source code for one-shot learning of handwritten characters with Bayesian Program Learning (BPL).
- omginternets 11y agoI think the question is "why did they select Matlab as their language".
- bronz 11y agoI think you misread my question or something.
- sabertoothed 11y agoI think he read correctly. You phrased it poorly.
- omginternets 11y agoShort answer: because everybody uses Matlab in research. - Lots of libraries - Nice graphical interface - Lots of online help - Matrices as a first-class citizen I hate Matlab as much as the next guy, but it's deeply ingrained in academia.
- bronz 11y agoSomeone down-voted me just for asking. I have no idea about any of this stuff and I was just genuinely curious. Apparently people are pretty polarized about Matlab. Thanks for explaining that to me.
- omginternets 11y ago>Someone down-voted me just for asking. People take the internet way too seriously :/ >Apparently people are pretty polarized about Matlab Yes, very much so. Much of the contention comes from the obscene licensing prices coupled with the fact that its a terrible language.
- tormeh 11y agoA terrible language with awesome libraries. In the language wars, libraries are king. I hate Matlab, but I've got to admit that the toolboxes are without peer.
- pmoriarty 11y agoPerl had tons of awesome libraries. Yet Python, Ruby, and Go, which had virtually none compared to Perl when they started still became very popular, and are arguably more popular than Perl now.
- daveguy 11y agoIncredible libraries, yes. But you may want to check out python with numpy, scipy, pandas, scikit-learn, etc. There are bundles like python (x,y) that bring them all together. Probably still want to stick with python 2.7 though (as most of scientific computing still does). This removes the tedious stumbling block that is forced unicode.
- Maken 11y ago>obscene licensing prices You can always use Octave.
- 11y ago
- orbifold 11y agoMy guess is that most of the general purpose programming languages are usually poorly suited in one way or another for domain specific programming. Matlab has a large standard library and a reasonably well integrated development environment. Its language and library ecosystem is also adapted to the domain the authors are working in. Scientific libraries in other languages come close or maybe surpass them, but it is still the de facto standard in certain parts of scientific computing. The only reasonable alternative I can think of is IPython / Anaconda with the right set of libraries or maybe Julia, which borrows heavily from Matlab, both however don't offer all of the IDE features that a typical Matlab user maybe takes for granted. Other languages like C++ are usually excluded by default because of their obvious very poor suitability for rapid exploratory programming.
- nemoniac 11y ago> My guess is that most of the general purpose programming languages are usually poorly suited in one way or another for domain specific programming. For this reason, Lisp would be ideal for this.
- orbifold 11y agoIn an ideal world maybe, but in reality if the fraction of (hours invested in actual project)/(hours invested in fixing tooling, write high quality easy to use libraries for data visualisation, data import / export, linear algebra, optimisation, statistics etc.) approaches zero, then a language probably won't be used. Also in this case the syntax of Matlab and the convenience with which you can manipulate indexed expressions with it, would probably not easily trumped even by a dsl embedded in Lisp, not without significant investment in developing such a domain specific language.
- eli_gottlieb 11y agoBecause Church (probabilistic Scheme) has been mostly discontinued, and Venture (the next big MIT probabilistic programming language) is currently somewhat hard to work with. Go try out the release tarballs and see.
- nextos 11y agoWhat do you think about alternatives? Like Anglican.
- eli_gottlieb 11y agoLooking at the latest release of Anglican, it looks awesome. I'm quite happy to see a PPL actually being maintained that still uses a functional-style `query` (allowing conditional distributions to be Yet More Distributions) instead of the imperative observe-infer programming from Venture.
- nextos 11y agoYeah, it's also quite nice it's Clojure, so full JVM stuff at disposal.
- argonaut 11y agoAs someone who has done a little bit of recent research in AI, pretty much everything high-level (new experiments, new models) is in MATLAB or Python (the exception is C/C++/Cuda if an algorithm or system must be implemented from scratch performantly). All the libraries are in those ecosystems. It really has nothing to do with syntax, performance, ease-of-learning, quality of IDE, concurrency support, online tutorials, quality of documentation, etc. Computer vision in particular is dominated by MATLAB because of its superior image/signal processing libraries. This may change as deep learning takes over computer vision (deep learning is dominated by (Python or Lua) + C++/Cuda).
- michael_h 11y agoI find OpenCV to be a far better alternative to MATLAB for image processing and CV work. The API's are extremely similar and when things don't work the way you expect, you can modify OpenCV to fit your needs. Plus, if you're a grad student and you write it in C++/Python with OpenCV, your algorithm might finish before it's time to graduate.
- sjtrny 11y ago> your algorithm might finish before it's time to graduate MATLAB is quite fast at vectorised and matrix operations. For things that are slow you can write your own C/C++ function and call it from within MATLAB.
- fnordfnordfnord 11y agoIn addition to the advantages of Matlab mentioned by others, a lot of uni/college freshman level (and even upper level) STEM curricula include one or more courses involving Matlab. They've gotten themselves included in a few textbooks as well.
- laughfactory 11y agoThat's awesome that Matlab is such a good expensive product. Personally I'm an open source guy all the way so I support R and Python (and Julia, I suppose) at every opportunity. Yeah, maybe there are some rough edges, but my thinking is that since they're good enough at this point, I can work around those rough edges...and I anticipate that hundreds of thousands of users will eventually drive them to being as good or better than any commercial offering. Take SAS, for instance, I don't like it--largely due to the fact that it's so expensive most companies don't upgrade until they absolutely have to. So you'll run into lots of employers running a very old version of SAS (like 9.2), without any of the extensions which help you solve problems and be more productive. So when I started my new data science-ish job at my current employer and had the option of which tools to use for machine learning and modeling I chose R and Python. But to each their own. I just dislike contributing to the market share of software I could never afford to run on my personal computer.
- fnordfnordfnord 11y agoI'm in agreement with most of the things you said, and I wasn't really meaning to advocate for Matlab; but rather just to point out another reason why someone might choose it. I used it in college, and at one company I worked at. It was much nicer to work with than LabView. I appreciated the hand-holding I got from Matlab, but eventually became competent enough to do my job in several languages, mainly Python. >I just dislike contributing to the market share of software I could never afford to run on my personal computer. I agree and that's one reason I tend toward OSS in courses I teach now, unless there is no practical alternative.