- Hands-On Mathematics for Deep Learning
- Jay Dawani
- 399字
- 2021-06-18 18:55:12
Metric space and normed space
Metrics help define the concept of distance in Euclidean space (denoted by ). Metric spaces, however, needn't always be vector spaces. We use them because they allow us to define limits for objects besides real numbers.
So far, we have been dealing with vectors, but what we don't yet know is how to calculate the length of a vector or the distance between two or more vectors, as well as the angle between two vectors, and thus the concept of orthogonality (perpendicularity). This is where Euclidean spaces come in handy. In fact, they are the fundamental space of geometry. This may seem rather trivial at the moment, but their importance will become more apparent to you as we get further on in the book.
In Euclidean space, we tend to refer to vectors as points.
A metric on a set S is defined as a function and satisfies the following criteria:
, and when
then
(known as the triangle inequality)
For all .
That's all well and good, but how exactly do we calculate distance?
Let's suppose we have two points, and
; then, the distance between them can be calculated as follows:

And we can extend this to find the distance of points in , as follows:

While metrics help with the notion of distance, norms define the concept of length in Euclidean space.
A norm on a vector space is a function , and satisfies the following conditions:
, and when
then
(also known as the triangle inequality)
For all and
.
It is important to note that any norm on the vector space creates a distance metric on the said vector space, as follows:

This satisfies the rules for metrics, telling us that a normed space is also a metric space.
In general, for our purposes, we will only be concerned with four norms on , as follows:
(this applies only if
)
If you look carefully at the four norms, you can notice that the 1- and 2-norms are versions of the p-norm. The -norm, however, is a limit of the p-norm, as p tends to infinity.
Using these definitions, we can define two vectors to be orthogonal if the following applies:

- Modern Programming: Object Oriented Programming and Best Practices
- Python廣告數(shù)據(jù)挖掘與分析實(shí)戰(zhàn)
- Redis應(yīng)用實(shí)例
- 數(shù)據(jù)結(jié)構(gòu)與算法(C語(yǔ)言版)
- Proxmox VE超融合集群實(shí)踐真?zhèn)?/a>
- 深入淺出Greenplum分布式數(shù)據(jù)庫(kù):原理、架構(gòu)和代碼分析
- 辦公應(yīng)用與計(jì)算思維案例教程
- Mastering LOB Development for Silverlight 5:A Case Study in Action
- Visual FoxPro數(shù)據(jù)庫(kù)技術(shù)基礎(chǔ)
- 企業(yè)大數(shù)據(jù)處理:Spark、Druid、Flume與Kafka應(yīng)用實(shí)踐
- 大數(shù)據(jù)網(wǎng)絡(luò)傳播模型和算法
- SQL應(yīng)用開(kāi)發(fā)參考手冊(cè)
- MATLAB基礎(chǔ)及其應(yīng)用教程
- 大數(shù)據(jù)原理與技術(shù)
- Learning Game AI Programming with Lua