Hamming distance measures the number of differing positions between two strings
Hamming distance measures the number of differing positions between two strings
The Hamming distance quantifies the minimum substitutions needed to transform one string into another. It is a fundamental concept in information theory, providing a way to measure the error rate between transmitted and received data. This metric is crucial for error detection and correction in data transmission.
Example
Consider two binary strings, "1101" and "1001". The Hamming distance between them is 1, as they differ in the second position.
Understanding Hamming distance is essential for designing efficient error-correcting codes, ensuring accurate data transmission.
Binary search
Time complexity of binary search: O(log n) — halves search space each step
Euclidean geometry
Euclidean distance measures absolute position in space
Chebyshev distance
Chebyshev distance is named after Pafnuty Chebyshev
O(n log n) is the lower bound for comparison-based sorting
O(n log n) is the lower bound because each of n elements must be compared at least log n times to ensure all permutations are considered
sinusoidal position encoding works: each dimension has a different frequency
Sinusoidal position encoding assigns unique frequencies to each dimension, enabling the model to distinguish positions effectively
Effect size
Cohen's D benchmarks: 0.2 = small, 0.5 = medium, 0.8 = large effect
One email a day: 5 concepts + the 5 stories that matter →
Swipe through 100 ML concepts daily
Open TickerNews