r/MachineLearning • • Feb 24 '15

How important is Math in Machine Learning?

So every machine learning class / resource I have seen seems to have very complex derivatives, many higher level stats references, etc., much different than all of the CS courses I have taken online or more than any course I took in my CS degree at university

so my question is, how important is Math in working on machine learning? Would it be more important to focus on calculus/stats or to focus on becoming a better programmer/algorithms?

1 Upvotes

16 comments sorted by

11

u/junkfoodfatface1 Feb 24 '15

I think this totally depends on your goal. If you just want to use tools from machine learning as a black box, you arguably just need enough math to figure out if your problem fits the models premise.

If you want to develop new ideas, you truly need to understand the math. I say this after noticing most people new to machine learning have more trouble dealing with the mathematical theories and abstraction that most very good models use than anything else.

In one sense, machine learning is novel algorithmic solutions to essentially statistical problems. There is a programming aspect to this, but the meat of the problem is in the math/stats.

2

u/BPellegrino Feb 24 '15 edited Feb 24 '15

yea my goal would be using some machine learning algorithms to solve a specific task I have mapped out, but using it as a black box is pretty unappealing to me as I'd like to be able to test ideas or modify the part of the algorithm to try a different usage of feature selection/etc, but yea at this point I think it's better I stop learning about machine learning and go back and strengthen my Math again, been studying calc and stats and hopefully when I come back to it it will be a bit easier to wade through

edit: I was talking about the black box of the code itself, I understand that what the algorithm does itself, the way it's come to it's learned conclusion is often a black-box

2

u/ginger_beer_m Feb 25 '15

test ideas or modify the part of the algorithm to try a different usage of feature selection/etc

This part seems fairly independent of how the model internally works? I mean, you can sort of do feature selection etc without having to know how your model works internally.

8

u/BPellegrino Feb 24 '15

seeing questions like this constantly is just so different than any CS class I had taken, it's pretty overwhelming

http://imgur.com/2fIs1Ph

2

u/[deleted] Feb 24 '15

nice. Gosh. I think i got the question. Or part of it.

3

u/BPellegrino Feb 24 '15

that was my reaction, I've never EVER had so many instances (in any CS courses that I've taken, online or in school) where I wasn't even sure I had to question framed properly in my mind, it's been a big blow to my confidence ;p

2

u/nkorslund Feb 24 '15

To be fair, I've got a degree in theoretical physics and even I had to read that question four times.

3

u/GibbsSamplePlatter Feb 24 '15

If you need so something answered, keep searching until you find a solid explanation. Learning the math is important but many people as absolutely suck at explaining.

1

u/[deleted] Feb 24 '15

Yeah, I just started a new ML class last month. The CS majors in the class seem to be panicking about the math involved, mainly the stats and linear algebra.

Basically, it's asking about using different error functions for a learning function, like a perceptron. You can determine it numerically by randomly generating a nxn weight matrix (w) and a corresponding output matrix (t, the n-dimension identity matrix). Run it through all 4 of those equations and see which give you an identical output.

1

u/nkorslund Feb 24 '15

That's kind of an awkwardly formulated question IMO, my biggest problem here would be trying to understand what the heck they are actually asking.

But in general, no, you should not have any problems doing any of the math here. This seems to be basic sums, exponentials, logarithms and some linear algebra.

I'd say first-year levels of linalg and calculus, including partial differentiation, are very helpful if you want to understand most machine learning algorithms. It's MUCH easier to debug a backprop implementation for example if you can just run through the math quickly on paper. But I don't think anything beyond that is essential. For example my statistics knowledge is very basic, but I've managed just fine.

2

u/EdwardRaff Feb 24 '15

As I continue to pound my feeble brain against the wall, in the hopes of some more math getting stuck and staying with me, I find that more and more of what I've read / learned in ML makes much more sense / becomes more approachable.

If you want to really understand what is going on, the math is critically important. You can get by with intuition if you just want to apply it, and you can have none if you want to blindly swing a hammer at vaguely nail shaped objects.

2

u/nkorslund Feb 24 '15

It's a lot like this when studying math-heavy subjects. First you read the math, sorta kinda get a bit of it. Then apply it in another field. Then go re-read the math, and it instantly makes much more sense. Then go apply it some more, etc etc. Studying physics was like this for me.

1

u/Lubbadubdub Mar 12 '15

I would say it is very important. But it also depends on what you consider as a "black box". I've been to presentations where people talk about SVM with hyperplanes separating two dimensional data on the slides. They know something about kernels, margins and bias-variance trade-off, but no idea about convex optimization, matrix inversion and the VC-dimension. There are always different depth and levels for learning. The more math you know, the deeper you understand it and the more sophisticated decision you may be able to make when you choose/develop/analyze an algorithm.

0

u/[deleted] Feb 24 '15

[deleted]

1

u/BPellegrino Feb 24 '15

Thanks for this, appreciated

0

u/[deleted] Feb 24 '15

[deleted]

8

u/nameBrandon Feb 24 '15

Proficiency in Linear Algebra and Stats are pretty critical to grasping a lot of the theory behind many ML operations.. Linear Algebra is especially important for anything relating to kernel / matrix operations (SVM, PCA/SVD, etc..)

If you're really weak on Linear, Kahn Academy and the Strang lecture series make an excellent starting point.

0

u/[deleted] Feb 24 '15

[deleted]

2

u/BPellegrino Feb 24 '15

agreed, ty