# Winnow (algorithm)

The winnow algorithm[1] is a technique from machine learning for learning a linear classifier from labeled examples. It is very similar to the perceptron algorithm. However, the perceptron algorithm uses an additive weight-update scheme, while Winnow uses a multiplicative scheme that allows it to perform much better when many dimensions are irrelevant (hence its name winnow). It is a simple algorithm that scales well to high-dimensional data. During training, Winnow is shown a sequence of positive and negative examples. From these it learns a decision hyperplane that can then be used to label novel examples as positive or negative. The algorithm can also be used in the online learning setting, where the learning and the classification phase are not clearly separated.

## Algorithm

The basic algorithm, Winnow1, is as follows. The instance space is ${\displaystyle X=\{0,1\}^{n}}$, that is, each instance is described as a set of Boolean-valued features. The algorithm maintains non-negative weights ${\displaystyle w_{i}}$ for ${\displaystyle i\in \{1,\ldots ,n\}}$, which are initially set to 1, one weight for each feature. When the learner is given an example ${\displaystyle (x_{1},\ldots ,x_{n})}$, it applies the typical prediction rule for linear classifiers:

• If ${\displaystyle \sum _{i=1}^{n}w_{i}x_{i}>\Theta }$, then predict 1
• Otherwise predict 0

Here ${\displaystyle \Theta }$ is a real number that is called the threshold. Together with the weights, the threshold defines a dividing hyperplane in the instance space. Good bounds are obtained if ${\displaystyle \Theta =n/2}$ (see below).

For each example with which it is presented, the learner applies the following update rule:

• If an example is correctly classified, do nothing.
• If an example is predicted incorrectly and the correct result was 0, for each feature ${\displaystyle x_{i}=1}$, the corresponding weight ${\displaystyle w_{i}}$ is set to 0 (demotion step).
${\displaystyle \forall x_{i}=1,w_{i}=0}$
• If an example is predicted incorrectly and the correct result was 1, for each feature ${\displaystyle x_{i}=1}$, the corresponding weight ${\displaystyle w_{i}}$ multiplied by α(promotion step).
${\displaystyle \forall x_{i}=1,w_{i}=\alpha w_{i}}$

A typical value for α is 2.

There are many variations to this basic approach. Winnow2[1] is similar except that in the demotion step the weights are divided by α instead of being set to 0. Balanced Winnow maintains two sets of weights, and thus two hyperplanes. This can then be generalized for multi-label classification.

## Mistake bounds

In certain circumstances, it can be shown that the number of mistakes Winnow makes as it learns has an upper bound that is independent of the number of instances with which it is presented. If the Winnow1 algorithm uses ${\displaystyle \alpha >1}$ and ${\displaystyle \Theta \geq 1/\alpha }$ on a target function that is a ${\displaystyle k}$-literal monotone disjunction given by ${\displaystyle f(x_{1},\ldots ,x_{n})=x_{i_{1}}\cup \cdots \cup x_{i_{k}}}$, then for any sequence of instances the total number of mistakes is bounded by: ${\displaystyle \alpha k(\log _{\alpha }\Theta +1)+{\frac {n}{\Theta }}}$.[2]

## References

1. ^ a b Nick Littlestone (1988). "Learning Quickly When Irrelevant Attributes Abound: A New Linear-threshold Algorithm", Machine Learning 285–318(2).
2. ^ Nick Littlestone (1989). "Mistake bounds and logarithmic linear-threshold learning algorithms". Technical report UCSC-CRL-89-11, University of California, Santa Cruz.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 18, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9455337524414062, "perplexity": 894.2340394216136}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-31/segments/1627046156141.29/warc/CC-MAIN-20210805161906-20210805191906-00581.warc.gz"}