Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to machine learning and scikit-learn

Will Rocha-Thomas
June 21, 2018
80

Intro to machine learning and scikit-learn

A basic introduction to key concepts underpinning machine learning and provides useful resources to get started, suitable for someone new to the field. Slides presented at The App Business (Dec, 2017) and Socrates UK conference (June, 2018).

Will Rocha-Thomas

June 21, 2018
Tweet

Transcript

  1. The field of study that gives computers the ability to

    learn without being explicitly programmed © The App Business What is machine learning? 2 (Arthur Samuel, 1959)
  2. © The App Business It’s not a new field, so

    why has it become the new cool thing? 3 Abundant data Abundant computation Advances in the field New possibilities and applications have been created by…
  3. © The App Business Why do people use machine learning?

    4 code may be easier to maintain at scale it can be more accurate than alternatives it can adapt faster to changing environments
  4. © The App Business Types of problem 5 Prediction: discrete

    value(s) Example algorithms: decision trees, logistic regression, k- nearerst neighbours Example usage: spam filtering Prediction: continuous value Example algorithms: linear regression, regression tree Example usage: predicting house prices Regression Classificiation Prediction: group based on relationship Example algorithms: k-means, affinity propagation, hierarchical Example usage: customer segmentation Clustering
  5. © The App Business Types of problem 6 Prediction: discrete

    value(s) Example algorithms: decision trees, logistic regression, k- nearerst neighbours Example usage: spam filtering Prediction: continuous value Example algorithms: linear regression, regression tree Example usage: predicting house prices Regression Classificiation Prediction: group based on relationship Example algorithms: k-means, affinity propagation, hierarchical Example usage: customer segmentation Clustering
  6. © The App Business Types of problem 7 Prediction: discrete

    value(s) Example algorithms: decision trees, logistic regression, k- nearerst neighbours Example usage: spam filtering Prediction: continuous value Example algorithms: linear regression, regression tree Example usage: predicting house prices Regression Classificiation Prediction: group based on relationship Example algorithms: k-means, affinity propagation, hierarchical Example usage: customer segmentation Clustering
  7. © The App Business Machine learning relies on reliable, accurate

    and comprehensive data Subtitle 9 Source: @mrogati
  8. © The App Business Approaches to training algorithms 11 Supervised

    training data includes desired solutions e.g. example spam/not spam messages Unsupervised training data doesn’t have labels or any penalties/rewards to guide e.g. suggest similar news articles Semi-supervised a mixture of the above two e.g. photo tagging where users tags a person in one picture & others with them found Reinforcement receive rewards and penalties from environment and learns using those e.g. show/hide this ad on Facebook
  9. © The App Business Incremental vs. batch 12 incremental or

    online learning learn on the fly from a continuous flow of data batch learning requires all training data to learn; once it’s live it doesn’t keep learning
  10. © The App Business How they generalise? 13 instance-based e.g.

    spam filter that looks for similarity to previous spam messages model-based e.g. house price predictor that looks for trends in training data to predict new values
  11. https://hackernoon.com/the-ai-hierarchy-of-needs-18f111fcc007 (thoughts on data capture) http://scikit-learn.org/stable/tutorial/basic/tutorial.html (source of tutorials) https://www.kaggle.com/

    (open data sets and ‘competitions’ to analyse them) https://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/ (python context) https://hanselminutes.com/607/removing-bias-from-ai-and-machine-learning-with-camille- eddy (podcast on AI, ML and bias) https://www.amazon.co.uk/gp/product/B06XNKV5TS/ (great intro book to ML and tooling ‘Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems’) © The App Business Some useful links 16