For neural networks, you can use BrainJS https://github.com/harthur/brain
Machine Learning in JavaScript
31–40 of 51 posts
Re: Machine Learning in JavaScript
#32Earlier quoted context omitted.
What alternatives would you recommend for someone new to programming and CS? I guess fleeing implies that they were using other tools already, but a lot of new devs are going to JS because it just makes sense to start there (lots of flexibility, hyperactive community, education value).
If you are at the point of your CS education that you are taking a serious look at machine learning and understanding the theory then you shouldn't have a problem translating into whatever your language of choice is. I get why a teacher would just want to pick a language and say "this is what it is in" but I don't get people who need CS concepts taught in their language of choice. The hard part is the theory and not…
This feels like begging the question. Why does that need to be the case? Why can't someone strive to learn machine learning _without_ learning a new language? Why can't they get a head start on the concepts early in their career? Is there some requirement that ML _must_ be an advanced topic, only accessible to polyglots that I haven't heard about?
Re: Machine Learning in JavaScript
#33Author here -- thanks for submitting, xd! Let me know if you have any questions. I do intend to keep up with this series, although my pace is pretty slow at about one article every three months or so. There are already a couple of comments about running ML in JS and how JS and the browser environment isn't terribly suited for heavy calculations. First: you're totally correct; second, I chose JS because it's 1) access…
JS and PHP are slow, crappy and bug prone. Sane languages (like Python, C++) have tools to make your job easier (like numpy, blas, eigen and other libraries). They provide fast and reliable math routines so you don't have to worry about some eigenvalue decomposition, matrix multiplication and other problems.
Re: Machine Learning in JavaScript
#34Earlier quoted context omitted.
If you are at the point of your CS education that you are taking a serious look at machine learning and understanding the theory then you shouldn't have a problem translating into whatever your language of choice is. I get why a teacher would just want to pick a language and say "this is what it is in" but I don't get people who need CS concepts taught in their language of choice. The hard part is the theory and not…
> If you are at the point of your CS education that you are taking a serious look at machine learning and understanding the theory then you shouldn't have a problem translating into whatever your language of choice is. This feels like begging the question. Why does that need to be the case? Why can't someone strive to learn machine learning _without_ learning a new language? Why can't they get a head start on the con…
I'm not saying there isn't room for the easier to understand and easier to read guides to ML. More the better, Mitchell was a beast to read through. Its just the language isn't the hard part of the subject. You are the author of the link, correct? I read through some of it, and its approaches the theory and subject matter in a gentle way which is what matters. The sample code is easy to read. I've written maybe 100 lines of js in my life and avoid all web dev like the plague. Your guide is well written and useful. I am not dogging it at all and please don't take it that way. I think its great!
What I'm saying is if someone is saying to themselves "I would be able to learn machine learning if only their was a guide in X" then they are probably mistaken. The code is easy, the math and theory is what is hard.
Re: Machine Learning in JavaScript
#35Author here -- thanks for submitting, xd! Let me know if you have any questions. I do intend to keep up with this series, although my pace is pretty slow at about one article every three months or so. There are already a couple of comments about running ML in JS and how JS and the browser environment isn't terribly suited for heavy calculations. First: you're totally correct; second, I chose JS because it's 1) access…
"2) it demystifies machine learning -- you have to write your ML from scratch, without the help of all those wonderful Python libs, and I think this exercise shows you that it's not so mysterious after all." - you can demystify machine learning in any better language. JS and PHP are slow, crappy and bug prone. Sane languages (like Python, C++) have tools to make your job easier (like numpy, blas, eigen and other libr…
I've even explicitly mentioned that I'm staying away from algorithms that rely on linear algebra, because I'm trying to bring these concepts to people who may not have a CS or mathematical background.
Re: Machine Learning in JavaScript
#36http://cs.stanford.edu/people/karpathy/convnetjs/
http://cs.stanford.edu/people/karpathy/svmjs/demo/
Heather Arthur (npm libraries brain, classifier) has also done a bunch of cool stuff!
Re: Machine Learning in JavaScript
#37Author here -- thanks for submitting, xd! Let me know if you have any questions. I do intend to keep up with this series, although my pace is pretty slow at about one article every three months or so. There are already a couple of comments about running ML in JS and how JS and the browser environment isn't terribly suited for heavy calculations. First: you're totally correct; second, I chose JS because it's 1) access…
Re: Machine Learning in JavaScript
#38This blog also contains a JavaScript physics series which is very cool. Do hope this author writes more again it has been quite.
Re: Machine Learning in JavaScript
#39Author here -- thanks for submitting, xd! Let me know if you have any questions. I do intend to keep up with this series, although my pace is pretty slow at about one article every three months or so. There are already a couple of comments about running ML in JS and how JS and the browser environment isn't terribly suited for heavy calculations. First: you're totally correct; second, I chose JS because it's 1) access…
"2) it demystifies machine learning -- you have to write your ML from scratch, without the help of all those wonderful Python libs, and I think this exercise shows you that it's not so mysterious after all." - you can demystify machine learning in any better language. JS and PHP are slow, crappy and bug prone. Sane languages (like Python, C++) have tools to make your job easier (like numpy, blas, eigen and other libr…
I also agree that other languages offer better tools. For instance, Python has Numpy. However, that's written in C++, not in Python. You can write plugins for Node in C++ too, so nothing would stop someone from writing a Numpy equivalent for JS. You might even be able to run it in some browsers through something like Emscripten with a performance overhead of 2-3x (I think?)
Re: Machine Learning in JavaScript
#40Earlier quoted context omitted.
> If you are at the point of your CS education that you are taking a serious look at machine learning and understanding the theory then you shouldn't have a problem translating into whatever your language of choice is. This feels like begging the question. Why does that need to be the case? Why can't someone strive to learn machine learning _without_ learning a new language? Why can't they get a head start on the con…
Because the nature of the subject requires a fair amount of background. To truly understand the subject and a lot of the approaches a firm understand of statistics, data structures, and even some calculus. Usually by the time someone these subjects down enough for anything substantial in ML then they've seen enough different languages to suss out the general idea of most algorithm sample code. I'm not saying there is…
For you, sure -- but not for everyone.
This series has actually been up for a little over a year now. I get emails from people who didn't know what machine learning was before they started reading the articles, and now they're building some of the most creative and beautiful projects out there. I also get emails from people who need to implement ML in JS or C-like languages but have had trouble seeing the algorithms in full relief when translating from Python, for instance.
The point is, your experience is not everyone's experience. My goal is purely one of accessibility of education. There are smart, talented people who never played with ML simply because they didn't want to dive into a different language, different platform, and different environment just to muck around. There are people who hadn't heard of ML before, but tried it out because JS was right there for them. There are people who stayed away from ML because they thought higher math and a CS education were requirements. Those are facts. This series serves all those people, and it serves them well.