Getting started with Machine Learning

5 minute read


If you are interested in Machine Learning you will find a lot of content online about it. I give below some content I find most appropriate to start to code and generate results.

The first step is to find a problem you are interested in solving and work hard to do it. Some good sources:

  • Scientific papers/thesis with data available (there are many)
  • Kaggle
  • UC Irvine Machine Learning Repository

Where to start learning?

Firstly, read the book

Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow:

start with Chapters 1-5. Take a look at and run the codes from its companion GitHub repo

This book has a good introductory level, without going into subtleties, and shows you how to build code to produce predictive models effectively using python and scikit-learn.

“I don’t know Python”

It’s fine, take a look at

I’m assuming you know to code in another language. Do use the jupyter notebooks. The google colab allows you to code without having the hassle of installing anything, as most of the packages are readily available in a virtual machine.

Going deeper and focusing

Advance your reading in the book and running the code as you get more confident. Once finished, go through Chapters 6-9 – always reading and running code.

You will notice that there are many methods available for machine learning. At an early stage, give focus to learn and apply the following:

  • Linear-in-the-parameters models (e.g. Elastic-Net, LASSO, ridge, logistic regression)
  • Support vector machines
  • Decision trees
  • Random forest and other ensemble methods (e.g. xgboost)
  • Artificial neural networks (you may learn this at a later stage, Chapters 10-11)

For a review on the performance of many different models and computational implementations, see the results in:

“I don’t like Geron’s book”

Ok. Below is the book by Raschka and Mirjalili, which is somehow equivalent in content to Geron’s. Take a quick look, maybe you prefer it:

It also has a companion code repo on GitHub:

Further reading at initial stage

While you read Geron’s or Raschka’s book, also read the corresponding parts of the paper A high-bias, low-variance introduction to Machine Learning for physicists. It also has a GitHub repo you can get inspiration from:

Do also check A Few Useful Things to Know About Machine Learning, which contains information regarding the ‘‘black-art’’ necessary for succesful machine learning applications.

Checklist of fundamental concepts to master at an early stage

  • Classification vs. regression problems
  • Supervised vs. unsupervised learning
  • Resampling for cross-validation and hold-out
  • What are hyperparameters and how to define them
  • Creating machine learning pipelines to build predictive models

How to report my results?

Glad you asked. The links below will point you to quick reads with best practices.

YouTube channels and courses

This channel is very good. Brunton has written many important works on Fluid Mechanics applications of Machine Learning, and also an introductory book on the topic.


As you go deeper and need to increase your understanding, you may then read about detailed theory.

This will help you propose new methods and use them more effectively, for knowing their inner workings.

Make sure to do this after you read the basic stuff and knows how to code.

Proceeding like this hopefully will motivate you and give directions which you will find necessary to read further:

  • Tom Mitchell, Machine Learning, McGraw Hill, 1997.

  • Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach, 4th Ed., 2020.

  • Elaine Rich and Kevin Knight, Artificial Intelligence, 3rd Ed. McGraw-Hill Higher Education, 2010.

  • Simon O. Haykin, Neural Networks and Learning Machines, 3rd Edition, Pearson, 2009.

  • Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani, An Introduction to Statistical Learning with Applications in R, 8th Ed., 2017.

  • Trevor Hastie, Robert Tibshirani, Jerome Friedman, The Elements of Statistical Learning, 2nd Ed., Springer, 2009.

  • Steven L. Brunton and J. Nathan Kutz. 2019. Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control (1st. ed.). Cambridge University Press, USA.

R or Python?

Both. Don’t waste time reading discussions on which is better. It is also possible to learn R for the same goals.

I’ve found in the last couple of years more momentum in Python related to Engineering applications, that’s the reason I advise you to start with Py. It is just a hint, nothing that I can measure or prove :)

Nonetheless, R has also a vibrant community and is worth learning as well. Use both to develop similar projects and you will be able to choose for yourself.

Once you have time to learn R, take a look at the book from Kuhn:

and the powerful caret package:

Introduction to Artificial Neural Networks [in Portuguese]

Deep Learning: An Introduction for Applied Mathematicians

Deep learning courses

Yann LeCun’s Deep Learning Course at CDS - NYU

Maziar Raissi - Applied Deep Learning

Further reading

Principal Component Analysis: A Natural Approach to Data Exploration