Prediction by partial matching

Prediction by partial matching (PPM) is an adaptive statistical data compression technique based on context modeling and prediction. PPM models use a set of previous symbols in the uncompressed symbol stream to predict the next symbol in the stream. PPM algorithms can also be used to cluster data into predicted groupings in cluster analysis.

## Contents

* 1 Theory
* 2 Implementation
* 3 See also
* 4 Sources
* 5 References
* 6 External links

## Theory

Predictions are usually reduced to symbol rankings[clarification needed]. Each symbol (a letter, bit or any other amount of data) is ranked before it is compressed, and the ranking system determines the corresponding codeword (and therefore the compression rate). In many compression algorithms, the ranking is equivalent to probability mass function estimation. Given the previous letters (or given a context), each symbol is assigned with a probability. For instance, in arithmetic coding the symbols are ranked by their probabilities to appear after previous symbols, and the whole sequence is compressed into a single fraction that is computed according to these probabilities.

The number of previous symbols, n, determines the order of the PPM model which is denoted as PPM(n). Unbounded variants where the context has no length limitations also exist and are denoted as PPM*. If no prediction can be made based on all n context symbols, a prediction is attempted with n − 1 symbols. This process is repeated until a match is found or no more symbols remain in context. At that point a fixed prediction is made.

Much of the work in optimizing a PPM model is handling inputs that have not already occurred in the input stream. The obvious way to handle them is to create a "never-seen" symbol which triggers the escape sequence[clarification needed]. But what probability should be assigned to a symbol that has never been seen? This is called the zero-frequency problem. One variant uses the Laplace estimator, which assigns the "never-seen" symbol a fixed pseudocount of one. A variant called PPMd increments the pseudocount of the "never-seen" symbol every time the "never-seen" symbol is used. (In other words, PPMd estimates the probability of a new symbol as the ratio of the number of unique symbols to the total number of symbols observed).

## Implementation

PPM compression implementations vary greatly in other details. The actual symbol selection is usually recorded using arithmetic coding, though it is also possible to use Huffman encoding or even some type of dictionary coding technique. The underlying model used in most PPM algorithms can also be extended to predict multiple symbols. It is also possible to use non-Markov modeling to either replace or supplement Markov modeling. The symbol size is usually static, typically a single byte, which makes generic handling of any file format easy.

Published research on this family of algorithms can be found as far back as the mid-1980s. Software implementations were not popular until the early 1990s because PPM algorithms require a significant amount of RAM. Recent PPM implementations are among the best-performing lossless compression programs for natural language text.

PPMd is a public domain implementation of PPMII (PPM with information inheritance) by Dmitry Shkarin and has undergone several incompatible revisions.[1] It is used in the RAR by default. It is also available in the 7z and zip file formats.

Attempts to improve PPM algorithms led to the PAQ series of data compression algorithms.

A PPM algorithm, rather than being used for compression, is used to increase the efficiency of user input in the alternate input method program Dasher.

## See also

* Language model
* n-gram

## Sources

* Cleary, J.; Witten, I. (April 1984). "Data Compression Using Adaptive Coding and Partial String Matching". IEEE Trans. Commun. 32 (4): 396–402. doi:10.1109/TCOM.1984.1096090.
* Moffat, A. (November 1990). "Implementing the PPM data compression scheme". IEEE Trans. Commun. 38 (11): 1917–1921. doi:10.1109/26.61469.
* Cleary, J. G.; Teahan, W. J.; Witten, I. H. (1997). "Unbounded length contexts for PPM" (in English). The Computer Journal (Oxford, England: Oxford University Press) 40 (2_and_3): 67–75. doi:10.1093/comjnl/40.2_and_3.67. ISSN 0010-4620. https://academic.oup.com/comjnl/article-abstract/40/2_and_3/67/360793.
* C. Bloom, Solving the problems of context modeling.
* W.J. Teahan, Probability estimation for PPM, Original Source from archive.org.
* Schürmann, T.; Grassberger, P. (September 1996). "Entropy estimation of symbol sequences". Chaos 6 (3): 414–427. doi:10.1063/1.166191. PMID 12780271. Bibcode: 1996Chaos...6..414S.

## References

1. ↑ "BMF, PPMd Всё о сжатии данных, изображений и видео" (in ru). http://compression.ru/ds/. NOTE: requires manually setting the "Cyrillic (Windows)" encoding in browser.

## External links

* Suite of PPM compressors with benchmarks
* BICOM, a bijective PPM compressor
* "Arithmetic Coding + Statistical Modeling = Data Compression", Part 2
* Script error: The function "in_lang" does not exist. PPMd compressor by Dmitri Shkarin
* PPM compression in C++ by René Puschinger

* v
* t
* e

Data compression methods

Lossless|

| Entropy type|

* Arithmetic
* Asymmetric numeral systems
* Golomb
* Huffman
* Adaptive
* Canonical
* Modified
* Range
* Shannon
* Shannon–Fano
* Shannon–Fano–Elias
* Tunstall
* Unary
* Universal
* Exp-Golomb
* Fibonacci
* Gamma
* Levenshtein

|

Dictionary type|

* Byte pair encoding
* Lempel–Ziv
* Brotli
* DEFLATE
* LZ4
* LZFSE
* LZJB
* LZMA
* LZO
* LZRW
* LZS
* LZSS
* LZW
* LZWL
* LZX
* Snappy
* Zstandard

Other types|

* BWT
* CTW
* Delta
* DMC
* DPCM
* LDCT
* MTF
* PAQ
* PPM
* RLE

Lossy|

| Transform type|

* Discrete cosine transform
* DCT
* MDCT
* DST
* FFT
* Wavelet
* Daubechies
* DWT
* SPIHT

|

Predictive type|

* DPCM
* ADPCM
* LPC
* ACELP
* CELP
* LAR
* LSP
* WLPC
* Motion
* Compensation
* Estimation
* Vector
* Psychoacoustic

Audio|

| Concepts|

* Bit rate
* ABR
* CBR
* VBR
* Companding
* Convolution
* Dynamic range
* Latency
* Nyquist–Shannon theorem
* Sampling
* Sound quality
* Speech coding
* Sub-band coding

|

Codec parts|

* A-law
* μ-law
* DPCM
* ADPCM
* FT
* FFT
* LPC
* ACELP
* CELP
* LAR
* LSP
* WLPC
* MDCT
* Psychoacoustic model

Image|

| Concepts|

* Chroma subsampling
* Coding tree unit
* Color space
* Compression artifact
* Image resolution
* Macroblock
* Pixel
* PSNR
* Quantization
* Standard test image

|

Methods|

* Chain code
* DCT
* DEFLATE
* Fractal
* KLT
* LP
* RLE
* Wavelet
* Daubechies
* DWT
* EZW
* SPIHT

Video|

| Concepts|

* Bit rate
* ABR
* CBR
* VBR
* Display resolution
* Frame
* Frame rate
* Frame types
* Interlace
* Video characteristics
* Video quality

|

Codec parts|

* DCT
* DPCM
* Deblocking filter
* Lapped transform
* Motion
* Compensation
* Estimation
* Vector
* Wavelet
* Daubechies
* DWT

Theory|

* Entropy
* Information theory
* Timeline
* Kolmogorov complexity
* Quantization
* Rate–distortion
* Redundancy

* Compression formats
* Compression software (codecs)

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Prediction by partial matching. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Prediction_by_partial_matching&oldid=212041"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template