当前位置:网站首页>Machine Learning Series 5: distance space (1)
Machine Learning Series 5: distance space (1)
2022-06-23 12:01:00 【Mr anhydrous】
One 、 What is space
Space , Is to define certain rules on a set , This rule can be generalized to every element in the set .
such as : So called atmospheric space , Is refers to “ Air molecules on earth , Any space that can be reached in a natural state ”. According to this definition , The space at the bottom of the well is atmospheric space , The space in basketball does not belong to the atmospheric space , Because natural forces cannot enter .
Distance space : Is on a set , Define the distance function between two points , This function can be regarded as a rule , For any point in the set .
Two 、 Understanding and defining distance space
2.1 Geometric understanding of the definition of distance space
stay mathematics in , metric space ( English :Metric space) It's a aggregate And its Measure , The Measure It's a function -- distance function . So-called “ distance function ” Refer to : Any two members of the set ( Usually we call it “ spot ”) The concept of distance between . The form of distance may vary , But all these functions , The following characteristics must be met :
- The distance between each point and itself is 0,
- The distance between any two points is a positive number ,
- from A To B Distance of , Equivalent to from B To A Distance of ,
- from A To B Is less than or equal to the distance from A Go first C Until then B Distance of .
For example, below :

In collection S in , Any point , such as A spot ,A To A The distance to 0; It's written in 
In collection S in , Any two points , such as A spot B spot ( Not coincident ), The distance is greater than 0; It's written in 
In collection S in , Any three points , such as A spot B spot C spot ( Not coincident ), The distance is :B To A Distance of , Must be less than B To C Distance plus C To A Distance of , It's written in :
In the metric space, the most consistent with people's intuitive understanding of reality is three-dimensional Euclid space . in fact ,“ Measure ” The concept of is Euclid distance The generalization of four well-known properties . Euclidean metric defines the distance between two points as the A straight line paragraph The length of . Besides , There are other metric spaces , Such as Elliptic geometry And Hyperbolic geometry , The distance measured by angle on the sphere is also a degree . Special relativity Using hyperbolic geometry Hyperboloid model , As Speed The metric space of .
2.2 Algebraic understanding of the definition of distance space
Be careful , What is the difference between algebraic understanding and geometric understanding ? answer : For the understanding of Geometry , The highest dimension is three-dimensional ; And algebraic understanding , It can be extended to N dimension , Even infinite dimensions .
metric space For one Ordered pair (M,d), among M by aggregate and d For in M Above all Measure (metric), Function

Make for any in M Inner x、y、z, The following conditions are true :
( Nonnegativity )
( The identity of the indistinguishable )
( symmetry )
( Trigonometric inequality ).
Metric spaces can also be exported The opening episode And Closed set And so on. Topological properties , This leads to a more abstract Topological space A study of .
Be careful : The algebraic understanding of distance is more abstract , So that some distance space may not be able to draw an image .
3、 ... and 、 Relatively simple distance space
The following questions need some proof , The proof requires some basic theorems , Here we first introduce these principles :
principle 1 : If a>b, and a>-b, that a>|b|.
principle 2: If a>|b|, So there are a>b establish ,a>-b It was also established .
We are building mathematical models , If some attributes are found to be a distance space , that , The entire set satisfies this relationship , Can greatly simplify data complexity . below , We will demonstrate the distance space of travel colors :
3.1 One dimensional number axis

Take the one-dimensional number axis as a set of points , Then the distance between any two points on the number axis :
, namely A and B The distance between two points is the absolute value of the coordinate value difference , We verify whether it is distance space :
- Nonnegativity :
, establish - identity :
, The coincidence distance between two points is zero - symmetry :

- Trigonometric inequality : Must prove
( Here's the picture ):

prove :
because :

--- This is through the above 3 The type and 6 The formula is added together .
--- This is through the above 4 The type and 5 The formula is added together .
therefore :

( The principle of this step is , if
) Certificate completion .
3.2 Manhattan distance
We are learning the principle of computer , I often meet “ Manhattan distance ”, The following proof ,“ Manhattan distance ” Conform to the definition of distance space .

The above figure shows the Manhattan distance : On the two-dimensional plane ,A Coordinates are (6,1),B Point coordinates (1,5), that A To B The distance function is :
d(A,B)=5+4 =9 ; A more formal expression is :

Now verify whether the distance space :
- Nonnegativity :
, establish - identity :
, The coincidence distance between two points is
- symmetry :

- Trigonometric inequality : Must prove
Verified as follows :

therefore , Just prove the objective inequality , That's all right. :

Here we only verify X Shaft part , The same principle is extended to Y Shaft part :


( Through the above 1、4 Merge to get )
( Through the above 2、3 Merge to get )
therefore ,
There are also : 
So the above (1) Form established , That is, Manhattan distance conforms to distance space .( Certificate completion )
Reference article
https://zh.wikipedia.org/zh-cn/%E5%BA%A6%E9%87%8F%E7%A9%BA%E9%97%B4
边栏推荐
- 全国进入主汛期,交通运输部:不具备安全运行条件的线路坚决停运!
- 得物多活架构设计之路由服务设计
- I am in Foshan. Where can I open an account? Is it safe to open a mobile account?
- 在工作中学习的三个方法
- ROS knowledge: the structure of the rviz library librviz
- The computer broke down. I changed the computer. There was a problem installing the node environment. The URL is not defined
- ROS知识:librviz库的调用实践
- 2022工具钳工(初级)考试练习题模拟考试平台操作
- Which securities company is the most reliable and safe to open an account
- ROS知识:读取点云数据文件
猜你喜欢
![Halcon principle: one dimensional function_ 1D type [1]](/img/ab/c0aee923fd0a9dd8a52b8cf31a6cd7.png)
Halcon principle: one dimensional function_ 1D type [1]

Getting started with redis - Chapter 2 - data structures and objects - linked lists

32路电话+2路千兆以太网32路PCM电话光端机支持FXO口FXS语音电话转光纤

2光2电级联型光纤收发器千兆2光2电光纤收发器迷你嵌入式工业矿用本安型光纤收发器

【进程和线程】

Shell process control - 39. Special process control statements

DuPont analysis: what is the investment value of Anyang Iron and Steel Co., Ltd?

全国进入主汛期,交通运输部:不具备安全运行条件的线路坚决停运!

Use xtradiagram Diagramcontrol for drawing and controlling process graphics

二维激光SLAM( 使用Laser Scan Matcher )
随机推荐
Go zero micro Service Practice Series (VI. cache consistency assurance)
Ros2 knowledge (1): start practicing robots
Open classes are short videos! Tonight, I will teach you how to realize accurately!
@黑马粉丝,这份「高温补贴」你还没领?
广播级E1转AES-EBU音频编解码器 E1转立体声音频卡侬头(XLR)编解码器
Use monotone stack to solve problems
ROS knowledge: the calling practice of librviz Library
如何卸载Gazebo与重装
Blue Bridge Cup single chip microcomputer (I) -- turn off peripherals and turn off led
开源之夏中选名单已公示,基础软件领域成为今年的热门申请
How to use the interval repetition memory system in flowus, notation and other note taking software?
Is there any regulation on the redemption time of financial products?
[cloud resident co creation] in the code free era, how does software development go to everyone?
Introduction to redis - Chapter 1 - data structures and objects - simple dynamic string (SDS)
凭借32量子比特!Rigetti Computing打入英国量子计算市场
Runtime application self-protection (rasp): self-cultivation of application security
ROS knowledge: reading point cloud data files
WC statistics are out of date, and every line of cloc code is valid
One picture decoding opencloudos community open day
汉源高科USB2.0光端机USB2.0光纤延长器USB2.0光纤传输器USB2.0接口转光纤
( Nonnegativity )
( The identity of the indistinguishable )
( symmetry )
(
, establish
, The coincidence distance between two points is zero 
( Here's the picture ):
, establish 