ArticleslgStudy

mathematics

Similarity measure

Similarity measure is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Similarity measure rather than just read about it. In short: In statistics and related fields, a similarity measure or similarity function or similarity metric is a real-valued function that quantifies the similarity between two objects. Although no single definition of a similarity exists, usually such measures are in some sense the inverse of distance metrics: they take on large values for similar objects and either zero or a negative value for very dissimilar objects.

Similarity measure — main illustration
Similarity measure — illustration

Key takeaways

  • Similarity measure belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Similarity measure to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Similarity measure from memory before moving on to harder problems.

Reference excerpt

In statistics and related fields, a similarity measure or similarity function or similarity metric is a real-valued function that quantifies the similarity between two objects. Although no single definition of a similarity exists, usually such measures are in some sense the inverse of distance metrics: they take on large values for similar objects and either zero or a negative value for very dissimilar objects. Though, in more broad terms, a similarity function may also satisfy metric axioms. Cosine similarity is a commonly used similarity measure for real-valued vectors, used in (among other fields) information retrieval to score the similarity of documents in the vector space model. In machine learning, common kernel functions such as the RBF kernel can be viewed as similarity functions.

Use of different similarity measure formulas Different types of similarity measures exist for various types of objects, depending on the objects being compared. For each type of object there are various similarity measurement formulas. Similarity between two data points

There are many various options available when it comes to finding similarity between two data points, some of which are a combination of other similarity methods. Some of the methods for similarity measures between two data points include Euclidean distance, Manhattan distance, Minkowski distance, and Chebyshev distance. The Euclidean distance formula is used to find the distance between two points on a plane, which is visualized in the image below. Manhattan distance is commonly used in GPS applications, as it can be used to find the shortest route between two addresses. When you generalize the Euclidean distance formula and Manhattan distance formula you are left with the Minkowski distance formulas, which can be used in a wide variety of applications.

Euclidean distance Manhattan distance Minkowski distance Chebyshev distance Similarity between strings For comparing strings, there are various measures of string similarity that can be used. Some of these methods include edit distance, Levenshtein distance, Hamming distance, and Jaro distance. The best-fit formula is dependent on the requirements of the application. For example, edit distance is frequently used for natural language processing applications and features, such as spell-checking. Jaro distance is commonly used in record linkage to compare first and last names to other sources.

Edit distance Levenshtein distance Lee distance Hamming distance Jaro distance Similarity between two probability distributions Typical measures of similarity for probability distributions are the Bhattacharyya distance and the Hellinger distance. Both provide a quantification of similarity for two probability distributions on the same domain, and they are mathematically closely linked. The Bhattacharyya distance does not fulfill the triangle inequality, meaning it does not form a metric. The Hellinger distance does form a metric on the space of probability distributions.

Bhattacharyya distance Hellinger distance Similarity between two sets The Jaccard index formula measures the similarity between two sets based on the number of items that are present in both sets relative to the total number of items. It is commonly used in recommendation systems and social media analysis. The Sørensen–Dice coefficient also compares the number of items in both sets to the total number of items present but the weight for the number of shared items is larger. The Sørensen–Dice coefficient is commonly used in biology applications, measuring the similarity between two sets of genes or species.

Jaccard index Sørensen–Dice coefficient Similarity between two sequences When comparing temporal sequences (time series), some similarity measures must additionally account for similarity of two sequences that are not fully aligned.

Dynamic time warping

Use in clustering

Clustering or Cluster analysis is a data mining technique that is used to discover patterns in data by grouping similar objects together. It involves partitioning a set of data points into groups or clusters based on their similarities. One of the fundamental aspects of clustering is how to measure similarity between data points. Similarity measures play a crucial role in many clustering techniques, as they are used to determine how closely related two data points are and whether they should be grouped together in the same cluster. A similarity measure can take many different forms depending on the type of data being clustered and the specific problem being solved. One of the most commonly used similarity measures is the Euclidean distance, which is used in many clustering techniques including K-means clustering and Hierarchical clustering. The Euclidean distance is a measure of the straight-line distance between two points in a high-dimensional space. It is calculated as the square root of the sum of the squared differences between the corresponding coordinates of the two points. For example, if we have two data points ( x 1 , y 1 ) {\displaystyle (x_{1},y_{1})} and ( x 2 , y 2 ) {\displaystyle (x_{2},y_{2})} , the Euclidean distance between them is d = √ [ ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 ] {\displaystyle d=\surd [(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}]} .

… excerpt ends here. Continue reading the full article.

Illustrations

Similarity measure: Heatmap of HIST1 region, which is located on mouse chromosome 13 at the following coordinates: [21.7 Mb, 24.1 Mb].
Heatmap of HIST1 region, which is located on mouse chromosome 13 at the following coordinates: [21.7 Mb, 24.1 Mb].

Worked examples

Example 1 — a first encounter with Similarity measure

Start with the simplest possible case. Write down what Similarity measure claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Similarity measure before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Similarity measure ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Similarity measure

In research
Similarity measure appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Similarity measure in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Similarity measure is common in secondary-school and first-year university syllabi. It links to neighbouring topics Clustering criteria, Similarity measures, Statistical classification, so understanding it makes those chapters shorter.
In everyday life
Look for Similarity measure outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Similarity measure” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Similarity measure in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Similarity measure means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Similarity measure out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Similarity measure in simple terms?

In statistics and related fields, a similarity measure or similarity function or similarity metric is a real-valued function that quantifies the similarity between two objects. Although no single definition of a similarity exists, usually such measures are in some sense the inverse of distance metr…

Why does Similarity measure matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Similarity measure?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Similarity measure.

Tags

  • Clustering criteria
  • Similarity measures
  • Statistical classification
  • Statistical distance

Keep exploring