
The real prerequisite for machine learning isn’t math, it’s data analysis (2016) - jdnier
https://www.r-bloggers.com/the-real-prerequisite-for-machine-learning-isnt-math-its-data-analysis/
======
johnhenry
As a mathematician, people routinely tell me that mathematics isn't applicable
in a particular situation. Upon deeper investigation, I usually find that they
simply have a very limited understanding of what math is. Most people
associate it with numbers and equations -- but those are just a few tools that
are taught early on. Actual math is about analysis and some of these tools MAY
be used when preforming it. Even some of the deeper topics, such as calculus
and algebra are simply tools in a greater framework of understanding.

Even if you're using very little of what you think of as "math" to interact
with your machine learning framework, to dismiss math as not being necessary
is ignoring all of the underlying mathematics that went into creating it. You
may not need calculus, or the like, but the math is there -- even if you don't
recognize it as such.

~~~
tprice7
"Even if you're using very little of what you think of as "math" to interact
with your machine learning framework, to dismiss math as not being necessary
is ignoring all of the underlying mathematics that went into creating it."

This seems like a straw man to me. The article never claimed that math is not
necessary for the development of machine learning frameworks. In fact, it
explicitly states the opposite:

"First of all, math is particularly important if you’re doing machine learning
research in an academic setting."

"In particular, there are people at companies like Google and Facebook who are
pushing the boundaries of machine learning – people working on bleeding edge
tools. These people almost certainly employ calculus, linear algebra, and more
advanced math routinely in their work."

~~~
johnhenry
Perhaps adding that last part without acknowledging these claims from the
article wasn't fair to the author. I meant it more of a rebuttal to the
subject line. I probably should have ended with something along the lines of
"data analysis is a different type of math" rather than trying to promote the
idea that "there's still math in machine learning".

------
rm999
I'm mixed on this article. While I strongly agree that data analysis trumps
math for applying machine learning, I think there's a middle ground the
article is missing.

Like programming, machine learning has its 10xers, and I've worked with
several. There's one thing they all have in common (beyond experience): they
can think like the model. They've read a bunch of ML papers, get the intuition
behind them, and envision from start to finish how data can be captured by
various models. Beyond a small amount of hyperparameter optimization they
often build a great model on the first or second take, and can put out
production models in days (which would normally take novices weeks or even
months). This requires math knowledge, because ML models are built on top of
math. Even in higher level ML packages that do a lot of the work for you,
novices get stuck in dead ends where their models don't work and they don't
know why. The 10xers drive right through it because they know why their model
isn't working.

When I interview for my team, I usually have non-junior candidates describe a
ML algorithm they would use for a specific problem, then ask why certain
things could go wrong - e.g. if they say they would use a logistic regression
model to predict an action, I ask why the model may be returning the same
score for every test case. A good candidate would understand that this means
the coefficients are getting pushed to zero, and would list off reasons why
this could be occurring (too much regularization, underpowered data, constant
target variable, etc). You learn these things from experience, but you
understand them because you know the math behind the models.

------
aqsalose
Yeah, I'm going to politely disagree that one can do multidimensional
statistics and _understand what one is doing_ without rudimentary
understanding of linear algebra and probability and basic concepts of calculus
(derivatives, integrals). The branch of science specialized in analyzing data
is known as "statistics": it's a mature field that's been around for some
time, and the things a working statistician should know are quite well
established.

Similar attitudes in the past have lead into misconceptions like if you are
only applying statistics in your research, you don't really have to understand
what _p_ -value is, just run the magical tests and report if it's
"significant" or not.

------
heydenberk
It really depends upon the organization — both the specific role of the data
scientist and the way in which machine learning is applied.

In some organizations, "data scientist" is the modern name for a business
analyst and the responsibilities largely involve basic data sanitization and
analysis, streamlining processes that were manual and tedious in previous
eras. In other organizations, people with advanced mathematics skills find
ways to apply mathematics and machine learning to gain a marginal advantage
over competitors or to deliver something novel to the market. This latter case
does indeed require a deep understanding of mathematics.

Using off-the-shelf implementations of ML algos might seem like it obviates
the math skills, but problem definition, algorithm selection and feature
engineering are difficult for laymen to do well, and can insidiously poison
the validity or efficacy of the results if done poorly.

------
jonbarker
Good ML people I know or have observed through interviews are good at a bunch
of things. The ones that come to mind are: Linear Algebra, Statistics, Python,
ETL operations with databases, Application Performance Analysis and testing,
and the crucially overlooked and slightly more fuzzy what I call 'problem
space analysis' (ie, looking at the problem space, whether it's a game or a
process, and discovering which human learned activities can be effectively
replaced or reimagined by training a model of some kind).

------
GlennS
I would say that what they're calling "data analysis" here is really maths.

Knowing how to manipulate tables is relational algebra, even if you never
learn the formalisms.

Representing the parts of a problem as symbols is just algebra.

------
return0
I am curious why there is so much talk about deep learning and math. In my
country calculus was part of high school curriculum as well as a hint of diff
eqs. DL theory is very undemanding in terms of math (cf quantum algorithms)
and if you know basic differentiation its easy to have a very good grasp of
the theory. I find it intellectually lazy to say than one should skip the
math. I mean, learning programming is an equally difficult, if not more
difficult task. Why is discussion so often about the math ?

~~~
Iv
Same here. Even to understand the theory, the only maths tools you really need
are differentiation of composite functions (derivatives of f(g(x)), taught in
high school ), what a gradient is (taught in 5 minutes if not taught in high
school), basic matrix operations (and I mean really basic ones like
transposition, nothing fancy like finding kernels) and then you can undertand
stochastic gradient descent.

The hardest may be thinking in terms of higher dimension tensors (matrices
that have 3 or more dimensions) but that is not even mathematics, just an
intellectual effort.

------
rfeather
Doing machine learning without math is like programming without knowing about
unit testing or data structures. Sure, you can get by. Good luck to anyone who
has to live with what you've made.

~~~
randomdata
But unit testing and data structures naturally follow as you progress as a
developer, even if your early work is poor.

Which supports the headline. The math will naturally follow as you gain
experience with ML, but not having good data will make even just starting your
journey difficult.

~~~
rfeather
In an academic/learning environment I agree. But, for professional purposes I
wouldn't hire even an entry level person who didn't have at least enough of a
basis to know when those concepts apply. I also wouldn't hire a data scientist
who can't at least tell me the high level workings of an algorithm they might
choose. I interview for both types of positions and know what it's like to
have to compensate for an amateur.

~~~
randomdata
_> In an academic/learning environment I agree. _

That is where everyone starts though. With time, they will become the
professionals that you want to hire.

------
NumberCruncher
Not all the good data scientists I used to work with/for are mathematicians
but all of them have a deep understanding of mathematics. Knowing math upfront
is not a must but if you are not willing to learn it along the way than you
shouldn't choose the path of ML.

------
lngnmn
The real prerequisite for machine learning is a domain expertise.

Otherwise algorithms will learn nonsense and random correlations made from
datasets of random noise.

Look at finance to see how it "works".

~~~
sgt101
Yup, the ability to understand what's going on and how it fits together is
critical.

But also : can work in a team and leverage relationships for insight.

------
196883
The importance of math for machine learning didn't fully sink-in for me until
I developed a deeper understanding of the back-propogation algorithm that
makes training deep neural networks computationally feasible. If it weren't
for the introduction of a continuous activation function combined with the
nice properties of the multivariate chain rule, we probably wouldn't be having
this discussion at all. Another example that comes to mind is kernel methods
used for Support Vector Machines.

No matter where the inspiration for a model comes from, the final formulation
is always mathematical, and I think that without an appreciation for the
mathematics, it's hard to get a true feeling of a model's effectiveness and
limitations.

------
ljw1001
The most important thing is not mentioned by the author or by the deep maths
thinking he critiques. It is understanding when and how to apply a model, how
to evaluate your results for robustness, how to interpret what it's saying.
These things can be taught/learned by solving problems along with a master,
even if that master is represented by a really good book, without a deep
understanding of the math.

In short, to _apply_ machine learning tools, you need a good understanding of
_applied_ machine learning, which is not a small subject area, but is very
approachable for most.

------
edimaudo
How can you run a good analysis without math?

~~~
rocqua
By doing good statistics. No-one cares whether a model's application is well
founded. What matters is if it's predictions hold up statistically. This means
lots of validation runs and defense against overfitting. That can all be done
while viewing the model as a black-box.

Model knowledge certainly helps, but it isn't neccesary.

~~~
NumberCruncher
"Statistics is a branch of mathematics dealing with the collection, analysis,
interpretation, presentation, and organization of data." /wikipedia/

~~~
Fomite
The relationship between math and statistics is an interesting one. In my
experience, "Statistics is a form of Math" is true when the math folks want it
to be, and is a totally separate thing that doesn't belong in the club at all
when they don't.

~~~
dsacco
I've never seen a mathematician claim that statistics is not a branch of
mathematics. Nor would that really make sense.

You can certainly _practice_ statistics in a way that mathematicians would
take issue with, but it's intrinsically a branch of math.

~~~
Fomite
I've seen a number of mathematicians take umbrage at the idea of describing
statisticians as mathematicians, or even applied mathematicians.

~~~
NumberCruncher
Thinking that we are somehow special makes us feel better. The truth is that
we are not.

------
tw1010
Sure, that's the way you'd think you have to do it if your resources about
this primarily come from HN. But there's whole different bag of tricks from
the purer side of math which those who've decided to follow the data analysis
path long-term use very fruitfully.

------
mwexler
(I'm assuming that we are talking about the original post
[http://sharpsightlabs.com/blog/machine-learning-
prerequisite...](http://sharpsightlabs.com/blog/machine-learning-prerequisite-
isnt-math/) reposted on r-bloggers, focusing on business/company use of data
science, not necessarily on the many other uses).

Lots of folks like to slag these articles and talk about how "If it's not real
Maths, it's crap"
([http://www.dailymotion.com/video/xgzfxs](http://www.dailymotion.com/video/xgzfxs)),
but if you've worked in larger orgs, you recognize that there is a need for
more than just advanced math. There really are myriad needs, and the failure
of AI/ML (yes, I'm combining them for simplicity here) in an org is usually
the lack of understanding these needs. Here are some I've seen:

1) What is the problem that AI/ML is being applied to? What is it optimizing,
deciding, predicting, forecasting, categorizing? How will this decision be
used in a process or flow? This requires a business analytic approach,
understanding available data, _what it means_, how it's generated, and how the
business might evaluate the impact of the ML/AI. These folks need to interact
with the business folks as well, so some communication skills are helpful...
though that's true for every role these days.

2) How will said decision be implemented both in tech build,
test/QA/FUT/UAT/etc, and prod? This technical architecture and approach is
data engineering, but some folks in the data science world are amazing at
this. BTW, a model that works in dev may not scale in prod. The fact that so
many folks keep "re-discovering" this is scary to me. There is a whole class
of amazing folks who can re-implement models to scale them, and if you know
them, reward them well.

3) How will models/algos/systems be built? This workflow is often pretty
sloppy, just a bunch of jupyter notebooks or a tonload scripts (but they're in
Git, so it's ok), and so replication and scaling becomes painful... esp. in
regulated industries. Again, data engineering approach, but needs a more
nuanced understanding of the vagaries of ML/AI. I find that solving business
problems may not always fit a traditional software workflow (call it "agile"
all you want, it doesn't always fit) but ymmv. So, you may need to create new
workflows for your org's needs, and this tooling may not be off the shelf, but
like automated testing, this tech debt will need to be paid sooner or later.

4) What ML/AI approach should I use, esp. if I'm using pre-existing
approaches? This becomes more of the data science analytic approach, mixing
the understanding of how ML/AI works with the data landscape (how was my
internal data generated? What does it mean? Is it stable? What's available at
score time, and what's it's latency?) and how to build various working
predictive models. Note that this is traditionally where data scientists/model
builders/analysts spend their time, from data cleansing to preliminary
analysis to generating/training various models to crying when none of them
predict well to stumbling onto a fascinating and amazing combination of models
and approaches at 3am. Yes, math is defn helpful here, but _understanding_ the
underlying math is often helpful enough, vs. _mastery_. A good understanding
of the levers affecting each model/algo/DL architecture/etc. and how to
diagnose them can get you pretty far, though you may violate assumptions or
overfit if you aren't careful.

5) Real Algo design: Using all that math that underlie the models to not just
diagnosing a pre-designed package but making your own optimizer, or your
minimizers, or your own way of computing the Hessian, or a new weighting
approaches, or whatever new approach your expertise is in. From writing your
own primitives to making your own deep learning architecture, this is often
the real wizardry, but it's not needed in EVERY case. But the effort can
really pay off, from optimized prediction, improved use of resources, and
unique IP which can be a competitive advantage. Remember, custom work is
great, but maintenance of the resulting product can be painful, esp. if done
in a language few folks in the org understand and if few resources are
available outside.

Finding skills to meet all of these needs in one person is certainly possible,
but somewhat unicornish. And you may not need all of these either. But the
best orgs that have to scale have at least a "Data Prep/Data Engineering"
role, a "Data Science" role, and if needed, a "Data Analyst" role who can help
translate specific business needs into analytic problems, and also carve off
the easy stuff (ad-hoc pulls and simpler analyses).

So, to original post: yeah, sort of. You need to be able to analyze, but you
also need to be able to do some of the math, and understand the impact of the
rest. If you are awesome at the math, go up to making your own magic. But if
you aren't, at least try to understand as much as you can, while trying to
also be familiar with the other areas. I do think that the emphasis on
visualization is somewhat glossy-ily ignoring real analysis skills, but it's
one of many helpful approaches to understanding the problem. (Pet peeve: Just
drawing graphs/charts is usually not analysis. Sorry, but true.)

If you are hiring for a data scientist, at least be clear with yourself on
what of these needs you are looking for, and if you need them all. Also be
clear about where you hope to grow, and if you are hiring for now, near
future, or the year 3000.

(Ok, one more: do yourself a favor and learn experimental design. I am sort of
shocked at how many data scientists I chat with who haven't really tested
champion/challenger models, or compared 2 or more processes or approaches in a
randomly assigned test, or gotten as close as they can with quasi-experimental
or matched-groups approaches. The simple ones are indeed really Excel simple,
but if it's so easy, why haven't you at least tried it? And the causal-
modeling stuff is a bayesian's dream come true, so it's worth learning.)

------
wbillingsley
In universities, it usually devolves into a land-grab around

1\. who teaches it

2\. what gets taught first

3\. what forms and notations get used

------
quanto
what is a good source to learn advanced data analysis for someone with
mathematical background?

~~~
sgt101
Judea Pearl & Andrew Gelman are great people. Trevor Hastie's books are good
too.

[https://web.stanford.edu/~hastie/pub.htm](https://web.stanford.edu/~hastie/pub.htm)

[http://bayes.cs.ucla.edu/jp_home.html](http://bayes.cs.ucla.edu/jp_home.html)

[http://andrewgelman.com/books/](http://andrewgelman.com/books/)

I guess it all depends on what is a mathematical background and what is
advanced!

~~~
quanto
Great. Thanks for the recommendation. What I mean by mathematical background
is at or above undergraduate level (so definitely covers calculus, linear
algebra, intermediate statistics). A background that can read Elements of
Statistical Learning (ESL) comfortably.

What I found is that many "data science" books cover how to use R or Pandas at
a very introductory level. Books like ESL focus on core theories (which is
great) but do not focus on how to tackle a tough real-world data.

I suppose much of data insight come from experience, but I was wondering
whether there are sources to help me jump start.

~~~
sgt101
The thing I struggle with is recognising what the problems in front of me are.
It's usually bloody obvious, no problem, but then the work is quick and
straightforward. The things that fill my calendar are the ones where we have
problems which cost massive money which no one has found a treatment for.

Sometime it suddenly becomes apparent and we suddenly see how to do it and
everyone feels pretty sheepish!

