7 ms·
Can someone please shed light to why so many ML tools and frameworks are being implemented in Python? What makes Python so special for doing ML? Personally, I
by staticelf 9y ago
Can someone please shed light to why so many ML tools and frameworks are being implemented in Python? What makes Python so special for doing ML?
Personally, I would love for MS to release or support a .NET based ML toolkit. There is open source stuff like http://accord-framework.net http://accord-framework.net but I would assume that it isn't as big nor complete as a framework being supported by a major corporation.
- aswanson 9y agoMomentum, community uptake. Python with numpy, matplotlib had the framework in place as a free alternative to the exhorbitantly priced Matlab. Community ran with it.
- romanovcode 9y agoSame here, kind of defeats the purpose of many libraries in my opinion if all of them are released for Python and look exactly the same. Think: front-end frameworks in javascript.
- timdorr 9y agoPython has always had a good selection of scientific/mathematical libraries (numpy, scipy). In addition, notebook apps like Jupyter fit well with the experimental nature of scientific code. I have a colleague who was attempting to do some stuff in Ruby (to fit with our application stack) who would leave IRB sessions open for weeks at a time. He's recently switched to Zepplin for notebook stuff, and it has been a huge productivity boost for him.
- pm90 9y agoMostly because Python is a great "glue" language. It isn't performant enough to implement the actual low-level computation, but is better at running other applications, getting data from them, feeding them into other applications (a.k.a pipelines).
- staticelf 9y agoSure but if I have invested a lot in MS technologies I am hesitant to learn and implement things in a completely new language if I can find something that is more fitting to the stack I already use.
- grtrans 9y agoIt’s not clear eg what use you would get from sharing a language between your model training and request processing.
- losteric 9y agoIf you already have a good stack that you're very effective, the switching cost may not be worth it. However, if you're more algorithmically focused, python is a great DSL
- HelloNurse 9y agoWhat relevant stack of Microsoft technology are you hoping to leverage for high performance numerical computation? Surely nothing involving .NET. Python for Windows and Python extensions can be compiled with Visual Studio; I don't see other ways to be more Microsoft-friendly.
- hackinthebochs 9y agoPython is easy to pick up (coming from someone who loves the MS stack). Don't let it being a new language deter you.
- nl 9y agoSure but if I have invested a lot in MS technologies I am hesitant to learn and implement things in a completely new language if I can find something that is more fitting to the stack I already use. The rest of the ML world is in that exact situation, but on Python. They aren't going to throw away their familiar tools unless everyone else does too.
- zitterbewegung 9y agoPython had a scientific community long before even this whole new fad of Data Science. Also, financial institutions helped make software such as Pandas. The last thing is that that the syntax of the language is really friendly and easy to use with batteries included. Others have mentioned its a great glue language since it was originally designed as a systems programming language and a bunch of *nix distributions use it for that purpose.
- aabajian 9y agoAs a long-time Java developer, Python was a beauty. It brings back the joy of programming and makes data manipulation a breeze. C# is better than Java, but it's still not as elegant/simple/clean as Python for data science.
- kuschku 9y agoPython is only fun for tiny projects. Once you reach 120k LOC in a project, refactoring in Python is an insanity even with PyCharm, and debugging becomes impossible, too. Have you tried Kotlin?
- bertomartin 9y agoCan you be specific on what makes this a headache? Your "refactoring" tells me that the code probably wasn't well structured in the first place and if so this would make refactoring difficult for any language, particularly dynamically typed ones.
- grtrans 9y ago> Your "refactoring" tells me that the code probably wasn't well structured in the first place Well considering this is a realistic scenario for fallible humans, it’s still decent advice to keep your exploratory projects in python small to avoid ridiculous tech debt. It’s not quite as bad as with ruby, but it’s close.
- kuschku 9y agoI've got exactly that experience. Many languages make it problematic to keep code actually bug-free and maintainable, and Python and especially Ruby are problematic for that, while Java and Kotlin, but even C++ (with a strict style guide) are a lot nicer to work with at scale. If you want to keep consistent APIs between modules, strict types and checked exceptions are very helpful, while with python one typo can lead to accesses being lost — which is why so many use slots nowadays, and TypedPython, and annotations. But if I do that, I might as well use Java or Kotlin, and get a better IDE. Compared to unit tests, strict and static types are faster, compared to no testing, static types are safer.
- make3 9y agoAccording to the nips blog I think, 98% of deep learning papers are published with python source, and 1% R 1% other stuff.
- alexcnwy 9y agoMost DL researchers are more into math/stats/theory than programming and Python is faaar easier to pick up and grok than java/.net/etc.
- saurik 9y agohttps://jeffknupp.com/blog/2017/09/15/python-is-the-fastest-growing-programming-language-due-to-a-feature-youve-never-heard-of/ https://jeffknupp.com/blog/2017/09/15/python-is-the-fastest-... > Python's Buffer Protocol: The #1 Reason Python Is The Fastest Growing Programming Language Today > The buffer protocol was (and still is) an extremely low-level API for direct manipulation of memory buffers by other libraries. These are buffers created and used by the interpreter to store certain types of data (initially, primarily "array-like" structures where the type and size of data was known ahead of time) in contiguous memory. > The primary motivation for providing such an API is to eliminate the need to copy data when only reading, clarify ownership semantics of the buffer, and to store the data in contiguous memory (even in the case of multi-dimensional data structures), where read access is extremely fast. Those "other libraries" that would make use of the API would almost certainly be written in C and highly performance sensitive. The new protocol meant that if I create a NumPy array of ints, other libraries can directly access the underlying memory buffer rather than requiring indirection or, worse, copying of that data before it can be used. (The italic emphasis was copied from the original article.)
- stingraycharles 9y agoThat doesn’t sound like a very satisfying reason to me. Isn’t a ByteArrayBuffer in Java pretty much the same (its underlying implementation is a char[] which can be used directly from C)? Is there perhaps another factor, such as an existing ecosystem or that it’s widely used in the academic field?
- genericpseudo 9y agoPython has been the language of choice for many physicists (when not doing Fortran) since the early 2000s.
- pathseeker 9y ago>Is there perhaps another factor, such as an existing ecosystem or that it’s widely used in the academic field? Yes, it's widely used in science in general. Don't underestimate the learning curves of other languages when your audience is scientists and mathematicians. Python is incredibly easy to use, even when using numpy and other scientific tools.
- oh-kumudo 9y agoData/ML people love python, they build a great ecosystem around it for 20 years. So yes, Python is pretty special.
- othersideofcoin 9y agoIt's a common denominator, few downsides, speed handled in lower level code/libs. Really good "get shit done" language, best GSD lang I've used. Scientists + programmers, data engineers and PhDs, all are cool w/ the syntax. It's open source, has a shitton of supporting libs. Outside of speed, I've read very few valid criticisms. What other languages are cross-platform, great lib support, delegate easily to lower level libs for perf, are there? (FWIW, any MS based language is probably excluded from consideration depending on its cross platform ability. Many data people -- like me! -- won't use a MS based OS)
- hacking_again 9y agoPython has its share of cruft and idiosyncrasies. I find some of the syntax irritating, e.g. boolean logic, argument handling, hidden / private / magic symbols, and those pesky half-open intervals that routinely lead to off-by-one errors.
- justnikos 9y agoCNTK has C# bindings (for training) since last month (and for evaluation since forever). Also more stuff will be coming into the core C# language.