2. Questions to answer
1. What is meant by “machine learning” and “deep learning”?
2. Is deep learning with neural networks the best solution for
most problems now days or what else is there to use?
3. How much theory do I need to get started with my app or
service?
4. How do I get from idea to trained and deployed model? …
and things to consider
4. Machine learning is a way to make advanced statistical models using
math. It’s a way to make a computer guess.
Machine learning models are fantastic with access to good data.
However machine learning models can’t perform magic.
Garbage in = Garbage out
5. Type of learning Description Example uses
Supervised learning Modelling an specified
target/output variable. Each
example is “labelled”.
Classification (into categories) or
regression (on a numerical target).
Predict if a person will default on
their loan. Model the sale price of
an apartment.
Unsupervised learning No target/control signal. Find
structure in data. Clustering.
Divide movies or bands into
genres from user data.
Semi-supervised learning Mix of the above. Only part of
input data is labelled.
As for supervised learning but
with incomplete labeling.
Reinforcement learning A system explores its
environment, takes actions and
receives rewards. No explicit
control signal. Learning by doing.
Teach software to play a game
(checkers, Atari Breakout, …)
Active learning Techniques to select the training
examples that the algorithm could
learn the most from at a given
time.
As for supervised learning but
trying to optimize the learning
process.
Types of machine learning
6. Deep learning is a subset of ML
“Deep learning” is just a
rebranding of “neural networks”!
These in turn are just systems for
fitting an output to an input by
repeatedly applying linear
transformations to the inputs until
they match the outputs.
7. Basic idea of neural networks
The input data, your data points, are assigned to input
“nodes” in an input “layer”.
These are connected with weights to a “hidden” layer,
which in turn is connected to the next hidden layer, or the
output layer.
The values in the input layer are multiplied by a weight
and the resulting products are summed to give an
“activation value” in the hidden (or output) layer.
In the output layer, the activations are compared to the
desired activations, and the weights are adjusted based
on how big the mismatch is. This is the “learning” part.
Deep learning just means many layers like this plus
maybe more complicated patterns in how the weights are
connected to inputs.
9. Random forests
Decision tree ensembles
Gaussian process regression (good at
handling uncertainty)
Lasso regression (looking for simple
models)
Elaborations on classical ML methods
17. Applications where you probably don’t need deep learning
• “Tabular data”, i.e., you have a table with rows and columns, where
the variables (columns) are a mix of numerical and categorical
variables – often standard methods are enough
• You have a small number of training examples (e.g. a couple of
hundred or less)
• When you want to create an easily interpretable model or just make
a quick sanity check
• Often, end users are more interested in understanding which
variables are important rather than the model’s accuracy
… in other words, you will quite often not need it.
19. How much math do I need?
Of course it is better to know some math/theory but frankly, it is probably sufficient to have some
intuition on how each method works.
If you know your maths, it is easier to implement models from papers or your own models, but existing
frameworks are enough to do a lot already. There has never been a better time to get into machine
learning!
- Incredible amounts of tutorials on e.g. Github and Medium
- MOOCs:
Andrew Ng, Coursera and deeplearning.ai
Jeremy Howard, Fast.ai
cognitiveclass.ai
- Software frameworks such as scikit-learn for Python
DSX tutorials & articles https://apsportal.ibm.com/community
20.
21. A way to practice: online contests
§ Largest online predictive modeling competition
platform
§ Founded 2010. Acquired by Google 2016
§ Companies or organizations define problems and
provide data; users compete for the best score. The
winner gets a money prize or in some case a job offer
22. • The leaderboard is motivating
• You can learn a lot from the discussion board
• Useful to learn and try out new techniques
• Learn not to overfit
24. 4 - How to go from idea to trained & deployed model?
25. Understand the goal.
What do you want to be able to predict or understand?
Can it be measured in a good way?
Do you have the data necessary to model it?
Actionability.
What is the next step if you get a good predictive model? Can you use it?
Are the variables that you use such that they can be easily adjusted?
Will end users be able to act on the results?
Data quality.
Can you extract the data in a good way?
Are the data complete? Are there missing/suspicious values?
Training data size and shape.
Do you have enough examples for training compared to the number of
variables (dimensions)? Do you have “wide” or “long” data?
Checklist for a machine learning idea
27. Tools: open-source vs. proprietary
Open source
Proprietary
Data science tools
Project collaboration
Notebooks
Model deployment
scikit-learn
Tensorflow
Keras
caret
Mlbench
Shiny
28. Deploying machine learning models
Easiest way? – Watson ML (today’s demo), or equivalents on Azure (Microsoft), CloudML
(Google), ECS (Amazon) …
Tensorflow (as some others) has built-in serving capabilities (Tensorflow Serving).
Do-it-yourself web servers – often done using Flask (Python web server framework), or for
language-independent model deployment, OpenScoring (uses PMML).
For non-production-grade deployment, can use Shiny (R web app library), or Python
equivalents (Plotly) Dash, Bokeh, (IBM) PixieDust.
Yhat - https://www.yhat.com/products/scienceops - commercial model deployment
solution that hooks directly into R or Python
29. What was not covered in this talk
• Visualisation and exploratory data analysis (including dynamic
data exploration apps)
• Details on how different ML models work
• Case studies
Maybe next time? J