{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Machine Learning Overview" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Preliminaries\n", "- Goal\n", " - Top-level overview of machine learning\n", "- Materials\n", " - Mandatory \n", " - this notebook\n", " - Optional\n", " - Study Bishop pp. 1-4\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### What is Machine Learning?\n", "- Machine Learning relates to **building models from data and using these models in applications**." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- **Problem**: Suppose we want to develop an algorithm for a complex process about which we have little knowledge (so hand-programming is not possible).\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ " - **Solution**: Get the computer to develop the algorithm by itself by showing it examples of the behavior that we want.\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ " - Practically, we choose a library of models, and write a program that picks a model and tunes it to fit the data.\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- This field is known in various scientific communities with slight variations under different names such as machine learning, statistical inference, system identification, data mining, source coding, data compression, data science, etc." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Machine Learning and the Scientific Inquiry Loop\n", "\n", "

\n", "\n", "- Machine learning technology uses the scientific inquiry loop to develop models and use these models in applications." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Machine Learning is Difficult\n", "\n", "- Modeling (Learning) Problems\n", " - Is there any regularity in the data anyway?\n", " - What is our prior knowledge and how to express it mathematically?\n", " - How to pick the model library?\n", " - How to tune the models to the data?\n", " - How to measure the generalization performance?\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- Quality of Observed Data\n", " - Not enough data\n", " - Too much data?\n", " - Available data may be messy (measurement noise, missing data points, outliers)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### A Machine Learning Taxonomy\n", "\n", "

\n", "\n", "- **Supervised Learning**: Given examples of inputs and corresponding\n", "desired outputs, predict outputs on future inputs.\n", " - Examples: classification, regression, time series prediction\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- **Unsupervised Learning**: (a.k.a. **density estimation**). Given only inputs, automatically discover representations, features, structure, etc.\n", " - Examples: clustering, outlier detection, compression\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- **Trial Design**: (a.k.a. experimental design, active learning). Learn to make actions that optimize some performance criterion about the expected future. \n", " - Examples: playing games like chess, self-driving cars, robotics. \n", " - Two major approaches include **reinforcement learning** and **active inference**\n", " - **Reinforcement Learning**: Given an observed sequence of input signals and (occasionally observed) rewards for those inputs, _learn_ to select actions\n", "that maximize *expected* future rewards.\n", " - **Active inference**: Given an observed sequence of input signals and a prior probability distribution about future observations, _learn_ to select actions\n", "that minimize *expected* prediction errors (i.e., minimize actual minus predicted sensation). " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "- Other stuff, like **preference learning**, **learning to rank**, etc., can often be (re-)formulated as special cases of either a supervised, unsupervised or trial design problem." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Supervised Learning\n", "\n", "- Given observations of desired input-output behavior $D=\\{(x_1,y_1),\\dots,(x_N,y_N)\\}$ (with $x_i$ inputs and $y_i$ outputs), the goal is to estimate the conditional distribution $p(y|x)$ (i.e., how does $y$ depend on $x$?).\n", "\n", "##### Classification \n", "\n", "

\n", "\n", "- The target variable $y$ is a _discrete-valued_ vector representing class labels \n", "- The special case $y \\in \\{\\text{true},\\text{false}\\}$ is called **detection**. " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "##### Regression \n", "\n", "

\n", "\n", "- Same problem statement as classification but now the target variable is a _real-valued_ vector.\n", "- Regression is sometimes called **curve fitting**." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Unsupervised Learning\n", "\n", "Given data $D=\\{x_1,\\ldots,x_N\\}$, model the (unconditional) probability distribution $p(x)$ (a.k.a. **density estimation**). The two primary applications are **clustering** and **compression** (a.k.a. dimensionality reduction). \n", "\n", "##### Clustering\n", "\n", "

\n", "\n", "- Group data into clusters such that all data points in a cluster have similar properties.\n", "- Clustering can be interpreted as ''unsupervised classification''." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "##### Compression / dimensionality reduction\n", "\n", "

\n", "\n", "- Output from coder is much smaller in size than original, but if coded signal if further processed by a decoder, then the result is very close (or exactly equal) to the original.\n", "- Usually, the compressed image comprises continuously valued variables. In that case, compression can be interpreted as ''unsupervised regression''." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Trial Design and Decision-making\n", "\n", "- Given the state of the world (obtained from sensory data), the agent must _learn_ to produce actions (like making a movement or making a decision) that optimize some performance criterion about the expected future.\n", "\n", "

\n", "\n", "- In contrast to supervised and unsupervised learning, an agent is able to affect its data set by making actions, e.g., a robot can change its input video data stream by turning the head of its camera. \n", "\n", "- In this course, we focus on the active inference approach to trial design, see the [Intelligent Agent lesson](https://nbviewer.jupyter.org/github/bertdv/BMLIP/blob/master/lessons/notebooks/Intelligent-Agents-and-Active-Inference.ipynb) for details. \n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Some Machine Learning Applications\n", "\n", "- computer speech recognition, speaker recognition\n", "- face recognition, iris identification\n", "- printed and handwritten text parsing\n", "- financial prediction, outlier detection (credit-card fraud)\n", "- user preference modeling (amazon); modeling of human perception\n", "- modeling of the web (google)\n", "- machine translation\n", "- medical expert systems for disease diagnosis (e.g., mammogram)\n", "- strategic games (chess, go, backgammon), self-driving cars\n", "\n", "- In summary, **any 'knowledge-poor' but 'data-rich' problem**\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": 1, "metadata": { "slideshow": { "slide_type": "skip" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "open(\"../../styles/aipstyle.html\") do f display(\"text/html\", read(f,String)) end" ] } ], "metadata": { "@webio": { "lastCommId": null, "lastKernelId": null }, "anaconda-cloud": {}, "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Julia 1.9.3", "language": "julia", "name": "julia-1.9" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.9.3" } }, "nbformat": 4, "nbformat_minor": 4 }