Last Updated on

Practitioners of practical subjects can suffer from math envy.

This is where they think that mathematicians are smarter than they are and that they cannot excel in a subject until they “know the math”.

I have seen this first hand, and I have seen it stop people from getting started.

In this post, I want to convince you that you can get started and make great progress in machine learning without being strong in mathematics.

## Get Started and Learn by Doing

I didn’t learn boolean logic before I started programming.

I just started programming and you probably did to.

I followed an empirical path that involved trial and error. It is slow and I wrote a lot of bad code, but I was passionately interested and I could see progress.

As I built larger and more complicated software programs I devoured textbooks because they let me build my programs better. I hunted for conceptual and practical tools I could use to overcome the limitations I was actually experiencing.

This was a powerful learning tool. If I had started out programming by being forced to learn boolean logic or concepts like polymorphism, my passion would never have been ignited.

## The Danger Zone

I like it when my programs don’t work. It means I have to roll up my sleeves and really understand what is going on.

You can get a long way by copy and pasting code without really understanding it. You only need to understand blocks of code as functional units that do a thing you need done. Glue enough of them together and you have a program that solves the problem you need solved.

This empirical hackery is a great way to learn fast, but a terrifying way to build production systems. This is an important distinction to make. The often spoken of “danger zone” is when systems built from empirical learning are made operational and the author does not really know how it works or what the results actually mean.

This is a very real problem. For example, take a look at some I.T. systems and webpages of small businesses that put up with this level of work.

In my mind, a prototype is a ball of copy-pasted mud held together with sticky tape that might sketch out what a solution could look like.

An operational system or a system that produces results or decisions used operationally has no surprises. You feel comfortable having an all day code review with the team picking over every line of code.

## The Technician

You can get started in machine learning today, empirically. Three options available to you are:

- Learn to drive a tool like scikit-learn, R or WEKA.
- Use libraries that provide algorithms and write little programs
- Implement algorithms yourself from tutorials and books.

More than options, this can be the path of the technician from beginner to intermediate that is learning the mathematics required for a technique, just-in-time.

Define small problems, solve them methodically and present the results of what you have learned on your blog. You will start to build up some momentum following this process.

There will be interesting algorithms that you will want to know more about, such as what a particular parameter actually does when you change it or how to get better results from a particular algorithm.

This will drive you to want (need) to understand how that technique really works and what it is doing. You may draw pictures of data flow and transformations, but eventually, you will need to internalize the vector or matrix representations and transformations that are occurring, only because it is the best tools we have available to clearly unambiguously describe what is going on.

You can remain the empiricist. I call this the path of the technician.

You can build up an empirical intuition of which methods to use and how to use them. You can also learn just enough algebra to be able to read algorithm descriptions and turn them into code.

There is a path here for the skilled technician to create tools, plug-in’s and even operational systems that use machine learning.

The technician is contrasted to the theoretician at the other end of the scale. The theoretician can:

- Internalize existing methods.
- Propose extensions to existing methods.
- Devise entirely new methods.

The theoretician may be able to demonstrate the capability of a method in the abstract, but is likely insufficiently skilled to turn the methods into code beyond prototype demonstration systems at best.

You can learn as little or as much mathematics as you like, just in time. Focus on your strengths and be honest about your limitations.

## Mathematics is Critical, Later

If you have to learn linear algebra just-in-time, why not learn it fully more completely up front and understand the machine learning methods at this deep level from the beginning?

This is certainly an option, perhaps the most efficient option which is why it is the path used to teach in university. It’s just not the only option available to you.

Just like learning to program by starting with logic and abstract concepts, internalizing machine learning theory may not be the most efficient way for you to get started.

In this post, you learned that there is a path available for the technician separate from that of the theoretician.

You learned that the technician can learn the mathematical representations and descriptions of machine learning algorithms just-in-time. You also learned that the danger zone for the technician is overconfidence and the risk of putting systems into production that are poorly understood.

This might be a controversial post, leave a comment and let me know what you think.

This is exactly what I did at Cal. Started off with the technician route, struggled and studied through really intense ML classes, learning as I went. The math was definitely intimidating, but over time I got a lot better at it. While Ive got a ways to go before becoming the theoretician, the more I do, the more intuition I develop. Also, learning theory is a lot more fun once you have some sense of why you need it. Learning the limitations of simple hacking is a strong motivator for doing more math and CS stuff.

Thanks for sharing Rishi, it’s great yo hear that you had a similar experience.

I had some college, I love math but I am over 50 and scare if it wouldn’t be waste of time. Also, which is easier Data Analytics or ML Tech.?

Data analysis is easier than machine learning.

Don’t follow easy, use whatever tools you need in the toolbox to get the results required.

Great advice!

Thanks Alex!

Awesome post. You spoke to the core of my existence as a software engineer and also the route I have been taking in machine learning. I appreciate you taking the time to inspire me to keep pressing on.

I’m really glad to here that Mike! Hang in there mate.

Thanks for this post. I found it by searching for an answer to the question “why I don’t get machine learning”. I guess you can say I am on the “theoretician” path right now, trying to learn machine learning in university without having sound math nor statistics background. It is a very daunting experience. Reading textbooks in machine learning without understanding most of the mathematics/statistics terminology is like reading in a language you don’t know. But I am able to solve problems with scikit-learn and your reminder of how I started learning programming helps me to keep going.

Great to hear, hang in there Stefan and ask lots of questions!

An enormous source of encouragement for a person with little background in Statistics & Probability!!

No words can fully describe my heart-felt gratitude towards your contribution to the quest of Machine Learning for all!

God bless!

Great advice.

I started coursera course on machine learning. While it is a great course, I am almost giving up on it, due to the theory intensive approach. I definitely have learnt a lot. But as a programmer, I would swear by your approach.

Thanks!

But what if one wanted to improve on the math needed in ML, to get from math novice to advanced? What are the main areas to study (foundations/fundamentals/prelim concepts and definitions)? do you have a post on this?

Thanks!

The project centric approach is by far the most effective. Mathematics makes sense and actually sticks when its applied in context.

I just love this post simply because I am a programmer first who wants to understand the problem and solve it with “code”. I do not understand a lot of stats/maths/linear algebra.

Your top down approach should be the go to approach for programmers in this field.

Another reason for top-down is this. Once you hit the math, it perks your ears to the applicable concepts when they come. I took stats once & remember thinking “Eigenvectors? When the heck am I gonna use these?”. Now I’m going back, re-learning and eating it up.

I personally like the “sweet and mop” approach. Sweep: take a basics on math (even some quickie YouTube vids); learn the basics of ML, enough to use scikit-learn. Now start doing, and 1h each day mop: start from the beginning, and thoroughly learn it all. That is: (1) quickie top-down, (2) do, (3) thorough bottom-up.

There still seems to be a lot of people out there who believe they can never become proficient at mathematics. This really holds a lot of people back and it shouldn’t.

That could be, in part, because of math anxiety (I wrote about this recently http://www.mlopt.com/?p=73). It could also be due to the abstract manner in which math is taught in schools. It isn’t easy to learn abstract concepts, but it’s also unnecessary in this case. You can learn the math effectively by applying it to a concrete problem. That means diving in to the machine learning, and dealing with the math as it is presented. In my view it is a mistake to avoid the math, especially early in the learning process when the student is becoming acquainted with the algorithms.

thank you so, so much for your piece on math anxiety. as someone who just started their computer science track (undergrad), and aspires to go into artificial intelligence, with very little background in math and terrible math anxiety.. this helped a lot. I know that if I can do it in the code, I should be able to do it on paper. yet I’m trying to avoid a calculus/math course at all cost. this really motivated me to do better and just keep practicing.

Hang in there!

I have a B.S. in Mathematics, and I agree with your approach. I certainly don’t remember everything I studied in college, and I have spent my career as a software developer learning things as-needed (just-in-time). And you are right, once you have the motivation to learn something, because it solves an immediate problem you have, you will learn it. I also agree with James above that people should not fear math – however, math anxiety is real, possibly the result of how we teach math to kids. Another point of view that your post alludes to is, spend your time solving the RIGHT problem; there are lots of problems out there, so spend your time wisely. Once you are sure your time will be well spent, the learning will be much easier.

Great , thank you jason

You’re welcome Michael.

Hello, currently I’m taking a MOOC from CalTech and it’s math intensive and sometimes I got very angry and frustrated for not understanding the concepts and the math involved, it makes me feel dumb! Thanks for this post, it gives me some motivation to give it a second chance.

I’m glad it helped Adolfo.

I do agree with your very practical approach. A new area like machine learning is quite exciting for people right from a researcher to a software professional. For me, machine learning provides me a new way to address my challenging problems. A formal learning will provide me good foundation to understand machine learning better. But I am quite keen on applying it to solve my problems. While I can pick up theory by putting extra effort, I would love to do just-in time when and how much is needed. Yes, I am motivated to learn/apply new stuff wearing a practical hat, Thanks, Ravi

Thanks Ravi.

I am interested in Machine Learning and I am going to follow the above approach. Thank you

I’m glad to hear that, hang in there!

I do agree with your approach. I really don’t remember the mathematics learned in my college stream.Hope this will workout. Thanks for your advise.

Thanks Rajiv, hang in there!

I totally agree, it should require lots of experience on code implementation rather than mathematical theory inside Machine Learning. Thank’s for your guidance in this dilemma, right now I am more confident learning ML.

Thanks, hang in there.

sir i am learing java script now . i was planing to do application enviroment in php .but sciene i heard about machine learning i want to go for this…what shold i do？

You can start here:

https://machinelearningmastery.com/start-here/

Hi Jason, So the statement ‘get over math envy’ really means ‘delay math envy until you better understand the context for it.’ Makes a lot of sense. It’s essentially how I did it in Grad school when I learned calculus from several books while taking graduate level courses in micro, math econ and math stats. Starting with math for math sake made little sense to me but when I discovered economics and modeling I got it and loved learning it. Thanks, Brian

Right on Brian!

I’m not sure if learning the theory and math behind everything before using machine learning is the most efficient way, or at least not in an academic or college context due to the limitations it imposes on your learning speed. I think it’s better to learn by doing and deepening as needed. I think the key is to learn the 20% that’s used in 80% of scenarios.

I agree. In fact, the 20% can come after you learn the process of working through problems end to end, so that you have a context for the math.

I like to learn mathematics about machine learning.

Great!

What a lovely article. I am sure you won’t something like anywhere else… It’s really awesome if you think. When everyone on the web is just trying to sell their training programs, no one is bothered about writing about this. Thanks a ton.

Thanks, I’m glad it helped.

Hi Jason – I am sure you are highly motivated but needed a quick advice from you . I am in mid forties( currently in India and been into database admin most of my career). Undergoing one overseas institutes data science formal path of learning that involves lot of maths. Much of the maths I left and forgot after my grad some 18-20yrs back although i recently built some to an reasonable extent to pass my course and can handle basic matrices, eigen vectors , linear algebra , optimization , but get frustrated everyday when I see that this world of maths is endless and nothing can affirm within us with a conviction that am accomplished . The guys who are already into mathematics core studies are definitely better . I am still determined to learn and jump into machine learning soon . But the very basic question is – will I be able to compete with the maths champs already in the market . By the time I start getting mastery , will be out of the market and retired – so thats my worry . Is it worth doing now although I have no fallback option to revert as am determined – just that am doubting my future success

Thanks

Saurav

Hang in there Saurav.

Think about to how many programmers you have worked with that had no CS degree. To how many network engineers who had no EE degree, etc.

Focus on the skill of working through real problems and delivering results.

The math is not magic that makes everything work or everything make sense. Applied ml is hard work, just like applied anything-else.

Hi jason. I’m an engineer with a master in Data Science. I totally agree with your post and explain the reason in my personal learning path. With a technical background i had no problem with calculus . I began to developt program in python but i didn’t know some concept for most advanced predictive models (deep learning). So i studied linear algebra (matrix calculus) and a general course in statistics. With this math knowledge I have a deeper understanding of a NN (ex: how a NN is trained). Next step try to build my own cost function (and gradients) for a specific network.(A proj involves RNN algos….I will buy your book ;))

I’m not a “just in time ” learner. I’d prefer to take a book ( or at least a good number of chapters on most relevant topics) and read it. After that i developt my own projects. The bad news you need a lot of time to familiarize with some advance math/programming concept and at work you don’t have so much time..

Yes, it’s hard. Each of must find our unique path.

Hang in there!

Hi Jason, I am very afraid of Machine learning because I really do not like calculus at all. It is just so hard. But now I see that every start up is using ML in their software company. Or just every company is using ML. How can someone thrive in this era if he cannot do calculus? I cannot just learn ML because of calculus. Can you please give advice to some guy like me how should I proceed if I am very bad at calculus and complex mathematics? (Barely passed my high school mathematics an year ago)

You can use the methods without diving into calculus!

Start here:

https://machinelearningmastery.com/start-here/#getstarted