|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "markdown", |
5 | | - "metadata": { |
6 | | - "deletable": true, |
7 | | - "editable": true |
8 | | - }, |
| 5 | + "metadata": {}, |
9 | 6 | "source": [ |
10 | 7 | "<!--BOOK_INFORMATION-->\n", |
11 | 8 | "<a href=\"https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv\" target=\"_blank\"><img align=\"left\" src=\"data/cover.jpg\" style=\"width: 76px; height: 100px; background: white; padding: 1px; border: 1px solid black; margin-right:10px;\"></a>\n", |
|
20 | 17 | }, |
21 | 18 | { |
22 | 19 | "cell_type": "markdown", |
23 | | - "metadata": { |
24 | | - "deletable": true, |
25 | | - "editable": true |
26 | | - }, |
| 20 | + "metadata": {}, |
27 | 21 | "source": [ |
28 | 22 | "<!--NAVIGATION-->\n", |
29 | 23 | "< [Dealing with Data Using OpenCV's TrainData Container in C++](02.05-Dealing-with-Data-Using-the-OpenCV-TrainData-Container-in-C++.ipynb) | [Contents](../README.md) | [Measuring-Model-Performance-with-Scoring-Functions](03.01-Measuring-Model-Performance-with-Scoring-Functions.ipynb) >" |
|
47 | 41 | "predict the labels of some new, never-seen-before test data. In this chapter, we want to dig a\n", |
48 | 42 | "little deeper, and learn how to turn our theoretical knowledge into something practical.\n", |
49 | 43 | "\n", |
| 44 | + "Along the way, we want to address the following questions:\n", |
| 45 | + "- What's the difference between classification and regression, and when do I use which?\n", |
| 46 | + "- What is a $k$-nearest neighbor ($k$-NN) classifier, and how do I implement one in OpenCV?\n", |
| 47 | + "- How do I use logistic regression for classification, and why is it named so confusingly?\n", |
| 48 | + "- How do I build a linear regression model in OpenCV, and how does it differ from Lasso and ridge regression?\n", |
| 49 | + "\n", |
| 50 | + "## Outline\n", |
| 51 | + "\n", |
| 52 | + "- [Measuring Model Performance with Scoring Functions](03.01-Measuring-Model-Performance-with-Scoring-Functions.ipynb)\n", |
| 53 | + "- [Understanding the k-NN Algorithm](03.02-Understanding-the-k-NN-Algorithm.ipynb)\n", |
| 54 | + "- [Using Regression Models to Predict Continuous Outcomes](03.03-Using-Regression-Models-to-Predict-Continuous-Outcomes.ipynb)\n", |
| 55 | + "- [Applying Lasso and Ridge Regression](03.04-Applying-Lasso-and-Ridge-Regression.ipynb)\n", |
| 56 | + "- [Classifying Iris Species Using Logistic Regression](03.05-Classifying-Iris-Species-Using-Logistic-Regression.ipynb)\n", |
| 57 | + "\n", |
| 58 | + "Let's jump right in!\n", |
| 59 | + "\n", |
| 60 | + "> The book provides an overview of common supervised learnig methods, and features a detailed treatment of common machine learning workflows. Below is a summary of these topics. For more information, please refer to the book.\n", |
| 61 | + "\n", |
| 62 | + "\n", |
| 63 | + "## Supervised learning in OpenCV\n", |
| 64 | + "\n", |
50 | 65 | "OpenCV provides a pretty straightforward interface for all its statistical\n", |
51 | 66 | "learning models, which includes all supervised learning models.\n", |
52 | 67 | "In OpenCV, every machine learning model derives from the `cv::ml::StatModel` base\n", |
|
61 | 76 | "- **Set parameters**: If the model needs some parameters, we can set them via setter methods, which can be different for every model. For example, in order for a $k$-NN algorithm to work, we need to specify its open parameter, $k$ (as we will find out later).\n", |
62 | 77 | "- **Train the model**: Every model must provide a method called `train`, used to fit the model to some data.\n", |
63 | 78 | "- **Predict new labels**: Every model must provide a method called `predict`, used to predict the labels of new data.\n", |
64 | | - "- **Score the model**: Every model must provide a method called `calcError`, used to measure performance. This calculation might be different for every model.\n", |
65 | | - "\n", |
66 | | - "Along the way, we want to address the following questions:\n", |
67 | | - "- What's the difference between classification and regression, and when do I use which?\n", |
68 | | - "- What is a $k$-nearest neighbor ($k$-NN) classifier, and how do I implement one in OpenCV?\n", |
69 | | - "- How do I use logistic regression for classification, and why is it named so confusingly?\n", |
70 | | - "- How do I build a linear regression model in OpenCV, and how does it differ from Lasso and ridge regression?\n", |
71 | | - "\n", |
72 | | - "## Outline\n", |
73 | | - "\n", |
74 | | - "- [Measuring Model Performance with Scoring Functions](03.01-Measuring-Model-Performance-with-Scoring-Functions)\n", |
75 | | - "- [Understanding the k-NN Algorithm](03.02-Understanding-the-k-NN-Algorithm.ipynb)\n", |
76 | | - "- [Using Regression Models to Predict Continuous Outcomes](03.03-Using-Regression-Models-to-Predict-Continuous-Outcomes.ipynb)\n", |
77 | | - "- [Applying Lasso and Ridge Regression](03.04-Applying-Lasso-and-Ridge-Regression)\n", |
78 | | - "- [Classifying Iris Species Using Logistic Regression](03.05-Classifying-Iris-Species-Using-Logistic-Regression)\n", |
79 | | - "\n", |
80 | | - "Let's jump right in!\n", |
81 | | - "\n", |
82 | | - "> The book also provides an overview over common supervised learning methods, allowing you to take the right approach for the task at hand." |
| 79 | + "- **Score the model**: Every model must provide a method called `calcError`, used to measure performance. This calculation might be different for every model." |
83 | 80 | ] |
84 | 81 | }, |
85 | 82 | { |
86 | 83 | "cell_type": "markdown", |
87 | | - "metadata": { |
88 | | - "deletable": true, |
89 | | - "editable": true |
90 | | - }, |
| 84 | + "metadata": {}, |
91 | 85 | "source": [ |
92 | 86 | "<!--NAVIGATION-->\n", |
93 | 87 | "< [Dealing with Data Using OpenCV's TrainData Container in C++](02.05-Dealing-with-Data-Using-the-OpenCV-TrainData-Container-in-C++.ipynb) | [Contents](../README.md) | [Measuring-Model-Performance-with-Scoring-Functions](03.01-Measuring-Model-Performance-with-Scoring-Functions.ipynb) >" |
|
114 | 108 | } |
115 | 109 | }, |
116 | 110 | "nbformat": 4, |
117 | | - "nbformat_minor": 0 |
| 111 | + "nbformat_minor": 1 |
118 | 112 | } |
0 commit comments