Page 1 of 1

### Building a foundation for CS/machine learning

Posted: Sun Jun 23, 2013 1:41 am UTC
Hi all,

I don't have a background in computer science but I'm about to start a master's in urban studies and I want to get into applying CS to that field. I've learned some Python, but I'm wondering if it's better to use these 2 months before school to focus on building a solid foundation in math. Do you have any advice on what a newbie should start with to really have a robust understanding of CS (with a focus on machine learning) down the road?

EDIT: I bought the "Calculus for Dummies" book. Is Calculus relevant to CS + machine learning? (Sorry for these insanely newbie questions.)

### Re: Building a foundation for CS/machine learning

Posted: Sun Jun 23, 2013 7:04 am UTC
As a CS major, I didn't find Calculus to be that useful. The math that I think is most directly relevant to CS and machine learning would be discrete math, linear algebra, and statistics.

### Re: Building a foundation for CS/machine learning

Posted: Sun Jun 23, 2013 10:50 am UTC
Well, "not directly relevant to CS and machine learning" isn't strictly true. However, if you remember the following fact, you'll know basically everything Calculus has to say about machine learning (and... really this is pretty much the only part of Calculus that any CS ever uses):

If you want to find the maximum/minimum value of a function, then the derivative has to be zero at any such point.

So like... take an afternoon to learn how to take derivatives (really, this is something that you can teach essentially anyone not completely incompetent in the span of a day) and then maybe learn what it means to take the gradient of a multidimensional function at a point (the generalization of the derivative). Then you can forget calculus forever.

Even this (somewhat important fact) only really shows up in the proofs that various methods in machine learning actually work, and aren't really necessary to understand anything. Things that are more relevant are linear algebra (which is the most useful math of all) and linear/quadratic programming. The latter doesn't usually show up in any pure-math course, but is the main tool which makes most of machine learning happen. But again, it's really only useful for the proofs and not technically necessary to understand the results. Except that to do a proper job with CS you need to have a baseline mathematical sophistication, which is easiest to acquire by just learning the basics of a bunch of mathematical disciplines.

### Re: Building a foundation for CS/machine learning

Posted: Sun Jun 23, 2013 5:32 pm UTC
Thank you! This is extremely helpful -- now I can use my time more effectively.

### Re: Building a foundation for CS/machine learning

Posted: Tue Jul 16, 2013 6:48 pm UTC
Machine learning is basically just applied statistics, and statistics is built on calculus. Probability density functions are defined as derivatives of distribution functions. Almost the entirety of Bayesian inference (which is the direction that modern machine learning has moved in) comes down to evaluating integrals. And so on.

Yes, you will need a solid foundation in calculus if you want to do or anything beyond just running black box functions over your data without any real understanding of what you are doing.