当前位置:网站首页>Gram 矩阵
Gram 矩阵
2022-06-26 05:36:00 【SP FA】
关于 Gram 矩阵
n 维欧式空间中任意 k 个向量之间两两内积所组成的矩阵,称为这 k 个向量的 Gram 矩阵。
向量内积公式: a ⃗ ⋅ b ⃗ = ∑ i = 1 n a i b i \vec a\cdot\vec b=\sum\limits_{i=1}^na_ib_i a⋅b=i=1∑naibi所以 Gram 矩阵的公式就是: G r a m ( a ⃗ 1 ⋯ a ⃗ k ) = ( ( a ⃗ 1 ⋅ a ⃗ 1 ) ⋯ ( a ⃗ 1 ⋅ a ⃗ k ) ⋮ ⋱ ⋮ ( a ⃗ k ⋅ a ⃗ 1 ) ⋯ ( a ⃗ k ⋅ a ⃗ k ) ) Gram(\vec a_1\cdots\vec a_k)=\begin{pmatrix}(\vec a_1\cdot\vec a_1)&\cdots&(\vec a_1\cdot\vec a_k)\\\vdots&\ddots&\vdots\\(\vec a_k\cdot\vec a_1)&\cdots&(\vec a_k\cdot\vec a_k)\end{pmatrix} Gram(a1⋯ak)=⎝⎜⎛(a1⋅a1)⋮(ak⋅a1)⋯⋱⋯(a1⋅ak)⋮(ak⋅ak)⎠⎟⎞
可以看出,Gram 矩阵是一个对称矩阵。
Gram 矩阵可以看作是数据之间的偏心协方差矩阵(即没有减去均值的协方差矩阵,关于协方差矩阵可以看这篇文章)
Gram 矩阵的应用
对于一组特征,我们计算它的 Gram 矩阵,可以反映出特征两两之间的相关性。对角线上的元素可以理解为该特征的信息,其余元素则提供了不同特征相关性信息,这样一个矩阵既能体现出有哪些特征,又能反映出不同特征之间的紧密程度。
Gram 矩阵最直接的应用是在图像风格迁移领域。对于一张图片,我们想要提取它的风格,就需要使用网络提取局部纹理特征、图像轮廓等信息,然后计算 Gram 矩阵,就可以找出特征之间的相关性,这个计算出的 Gram 矩阵就反映了图像的风格。此时如果要比较两张图片之间的风格相似程度,只需要比较它们的 Gram 矩阵,若 Gram 矩阵的差异较小,则可以认为两张图像风格相近。
边栏推荐
- 12 multithreading
- cartographer_ backend_ constraint
- Learn cache lines and pseudo sharing of JVM slowly
- When was the autowiredannotationbeanpostprocessor instantiated?
- Security problems in wireless networks and modern solutions
- Leetcode114. Expand binary tree into linked list
- 操作符的优先级、结合性、是否控制求值顺序【详解】
- SDN based DDoS attack mitigation
- 电机专用MCU芯片LCM32F037系列内容介绍
- What management systems (Updates) for things like this
猜你喜欢

Mongodb image configuration method

As promised: Mars, the mobile terminal IM network layer cross platform component library used by wechat, has been officially open source

cartographer_backend_constraint

Ad tutorial series | 4 - creating an integration library file

Henkel database custom operator '~~‘

Red team scoring method statistics

基于SDN的DDoS攻击缓解

Installation and deployment of alluxio

Fedora alicloud source

12 multithreading
随机推荐
劣币驱逐良币的思考
Leetcode114. Expand binary tree into linked list
BOM文档
【活动推荐】云原生、产业互联网、低代码、Web3、元宇宙……哪个是 2022 年架构热点?...
Install the tp6.0 framework under windows, picture and text. Thinkphp6.0 installation tutorial
Project suspension
【MYSQL】MySQL 百万级数据量分页查询方法及其优化
A new explanation of tcp/ip five layer protocol model
What management systems (Updates) for things like this
Using Jenkins to perform testng+selenium+jsup automated tests and generate extendreport test reports
Ad tutorial series | 4 - creating an integration library file
cartographer_ fast_ correlative_ scan_ matcher_ 2D branch and bound rough matching
LeetCode_ Binary search tree_ Simple_ 108. convert an ordered array to a binary search tree
11 IO frame
Win socket programming (Mengxin initial battle)
Posting - don't get lost in the ocean of Technology
skimage. morphology. medial_ axis
数据存储:MySQL之InnoDB与MyISAM的区别
Something about MariaDB
[arm] build boa based embedded web server on nuc977