ai 中 统计_AI统计(第2部分)

ai 中 统计

Today I plan to cover the following topics: Linear independence, special matrices, and matrix decomposition.

今天,我计划涵盖以下主题:线性独立性,特殊矩阵和矩阵分解。

线性独立 (Linear independence)

A set of vectors is linearly independent if none of these vectors can be written as a linear combination of other vectors.For example, V1=(1,0) and V2=(0,1). Here, V2 cannot be written in terms of V1. However, V3 (3,4) is linearly dependent as V3 can be expressed as 3V1+4V2.

如果这些向量中的任何一个都不能写成其他向量的线性组合,则它们是线性独立的,例如V1 =(1,0)和V2 =(0,1)。 在此,不能用V1来写V2。 但是,V3(3,4)与线性相关,因为V3可以表示为3V1 + 4V2。

Mathematically, s={V1, V2,…., Vn} is linearly independent if and only if the linear combination α1V1+α2V2+…..+αnVn=0 means that all αi=0.

在数学上,当且仅当线性组合α1V1+α2V2+ .... +αnVn= 0表示所有αi= 0时,s = {V1,V2,....,Vn}是线性独立的。

矩阵运算 (Matrix operations)

Matrices can transform one vector to another vector. For example, V is an Nx1 vector and w is also an Nx1 vector.

矩阵可以将一个向量转换为另一向量。 例如,V是Nx1向量,w也是Nx1向量。

矩阵的痕迹 (Trace of a matrix)

Trace of a matrix is given by its sum of diagonal elements. For matrix A, its trace will be the summation of all the elements with the same value of row and column.

矩阵的迹线由对角元素的总和给出。 对于矩阵A,其轨迹将是具有相同行和列值的所有元素的总和。

Image for post
Trace of a matrix, Image by author
矩阵的痕迹,作者提供的图像

一些属性 (Some properties)

  1. Tr(A+B) = Tr(A)+Tr(B)

    Tr(A + B)= Tr(A)+ Tr(B)
  2. Tr(AB) = Tr(BA)

    Tr(AB)= Tr(BA)
  3. Tr(A) = Tr(A.T) (A.T means transpose of matrix A)

    Tr(A)= Tr(AT)(AT表示矩阵A的转置)

矩阵的行列式 (The determinant of a matrix)

Laplace expansion for an NxN matrix is given by the following formula:

NxN矩阵的拉普拉斯展开式由以下公式给出:

Image for post
The determinant of a matrix, Image by author
矩阵的行列式,作者提供的图像

Determinant actually represents the volume formed by the column vectors. For a 2x2 vector, it represents the area.

行列式实际上表示由列向量形成的体积。 对于2x2向量,它表示面积。

Image for post
Interpretation of 2x2 vectors in space, Image by author
空间中2x2向量的解释,作者提供

矩阵的可逆性 (Invertibility of a matrix)

The inverse of a matrix A is possible only if the det(A) is not 0. Note that this automatically means that the columns of A have to be linearly independent. Consider a matrix below.

仅当det(A)不为0时,矩阵A的逆才可能。请注意,这自动意味着A的列必须线性独立。 考虑下面的矩阵。

Image for post
Matrix A, image by author
矩阵A,作者提供的图片

Note that V1, V2,…., Vn are vectors and if any vector, say, Vn can be written as linearly dependent vectors of the rest like Vn=α1V1+α2V2+…..+αn-1Vn-1 then, we can do a simple column operation i.e last column = the last column- (α1V1+α2V2+…..+αn-1Vn-1) and this would yield a column full of zeros. This will make the determinant of matrix 0. For a 2x2 matrix, we will have 2 vectors V1 and V2. If V1 and V2 are linearly dependent like V1=2V2, then the area formed by the two vectors is going to be zero. A smart way to put this would be that the two vectors are parallel to one another.

请注意,V1,V2,...,Vn是向量,如果有任何向量,例如,Vn可以写为其余部分的线性相关向量,例如Vn =α1V1+α2V2+ ..... +αn-1Vn-1,那么我们可以一个简单的列运算,即最后一列=最后一列-(α1V1+α2V2+ ..... +αn-1Vn-1),这将产生一列充满零的列。 这将决定矩阵0的行列式。对于2x2矩阵,我们将有2个向量V1和V2。 如果V1和V2是线性相关的,例如V1 = 2V2,则由两个向量形成的面积将为零。 一种明智的解释是,两个向量彼此平行。

特殊矩阵和向量 (Special matrices and vectors)

  1. Diagonal matrix: Only diagonal entries are non zero and rest all elements are zero. D(i,j) = 0 if i is not equal to j.

    对角矩阵:仅对角线条目为非零,其余所有元素为零。 如果i不等于j,则D(i,j)= 0。
  2. Symmetric matrix: A matrix is said to be symmetric if the matrix and its transpose are equal.

    对称矩阵:如果矩阵及其转置相等,则称该矩阵是对称的。
  3. Unit vector: vector with unit length. 2-Norm of the vector is 1.

    单位向量:单位长度的向量。 向量的2范数为1。
  4. Orthogonal vectors: Two vectors X and Y are orthogonal if (X.T)Y = 0

    正交向量:如果(XT)Y = 0,则两个向量X和Y是正交的
  5. Orthogonal matrix: If a transpose of a matrix is equal o its inverse, then we can say that the matrix is orthogonal. Also, all columns are orthonormal. The orthogonal matrix can be used to rotate vectors which preserve volume.

    正交矩阵:如果矩阵的转置等于其逆,则可以说矩阵是正交的。 同样,所有列都是正交的。 正交矩阵可用于旋转保留体积的向量。
  6. Orthonormal matrix: If the inverse of a matrix is equal to its transpose with unit determinant, the matrix is said to be orthonormal.

    正交矩阵:如果矩阵的逆等于其行列式的转置,则称该矩阵为正交的。
Image for post
Orthogonal matrix, Image by author
正交矩阵,作者提供的图片
Image for post
Orthonormal matrix, Image by author
正交矩阵,作者提供

本征分解 (Eigen decomposition)

Eigen decomposition is extremely useful for a square symmetric matrix. Let's look at the physical meaning of the term.

本征分解对于平方对称矩阵非常有用。 让我们看一下该术语的物理含义。

Every real matrix can be thought of as a combination of rotation and stretching.

每个实数矩阵都可以视为旋转和拉伸的组合。

Image for post
Vector multiplication, Image by author
矢量乘法,作者提供的图像
Image for post
operation on vector v that generates vector w, Image by author
向量v的运算,产生向量w,作者提供

Here, A can be thought of as an operator tat stretches and rotates a vector v to obtain a new vector w. Eigenvectors for a matrix are those special vectors that only stretch under the action of a matrix. Eigenvalues are the factor by which the eigenvectors stretch. In the equation below, the vector v is stretched by a value of lambda when operated with an eigenvector A.

在这里,可以将A视为操作员tat拉伸并旋转向量v以获得新的向量w。 矩阵的特征向量是那些仅在矩阵作用下才拉伸的特殊向量。 特征值是特征向量伸展的因子。 在下面的公式中,向量v在使用特征向量A时被拉伸了一个lambda值。

Image for post
Eigenvalue lambda of a vector v, Image by author
向量v的特征值λ,作者提供的图像

Say, A has n linearly independent eigenvectors {V1, V2,….., Vn}. On concatenating all the vectors as a column, we get a single eigenvector matric V where V=[V1, V2,….., Vn]. If we concatenate the corresponding eigenvalues into a diagonal matrix i.e Λ=diag(λ1, λ2,…, λn), we get the eigendecomposition (factorization) of A as:

假设A有n个线性独立的特征向量{V1,V2,…..,Vn}。 将所有向量连接为一列后,我们得到单个特征向量矩阵V,其中V = [V1,V2,.....,Vn]。 如果将对应的特征值连接到对角矩阵即Λ = diag(λ1,λ2,...,λn),则得到A的特征分解(因式分解)为:

Image for post
eigendecomposition of A, Image by author
A的特征分解,作者提供

Real symmetric matrices have real eigenvectors and real eigenvalues.

实对称矩阵具有实特征向量和实特征值。

Image for post
Real symmetric matrix, Image y author
实对称矩阵,作者:y

二次形式和正定矩阵 (Quadratic form and positive definite matrix)

The quadratic form can be interpreted as a ‘weighted’ length.

二次形式可以解释为“加权”长度。

Image for post
Quadratic form, Image by author
二次形式,作者提供的图片
Image for post
Quadratic form, Image by author
二次形式,作者提供的图片

The positive definite (PD) matrix has all eigenvalues greater than zero. The semi-definite positive(PSD) matrix has eigenvalues greater than equal to zero. A PD matrix has a property that for all X, (X.T)AX is greater than 0. For example, if A=I or identity matrix then, (X.T)I(X)=(X.T)(X) which is greater than 0. A PSD matrix has a property that for all X, (X.T)AX is greater than equal to 0. Similarly, a negative definite (ND)matrix has all eigenvalues less than zero. And semi-negative definite (PD)matrix has all eigenvalues less than equal to zero.

正定(PD)矩阵的所有特征值均大于零。 半定正(PSD)矩阵的特征值大于零。 PD矩阵的属性是,对于所有X,(XT)AX都大于0。例如,如果A = I或单位矩阵,则(XT)I(X)=(XT)(X)大于0. PSD矩阵具有以下特性:对于所有X,(XT)AX都等于0。类似地,负定(ND)矩阵的所有特征值均小于零。 半负定(PD)矩阵的所有特征值均小于零。

奇异值分解 (Singular value decomposition)

If A is an MxN matrix, then

如果A是MxN矩阵,则

Image for post
Singular value decomposition, Image by author
奇异值分解,作者提供
  1. U is an MxM matrix and orthogonal

    U是MxM矩阵并且正交
  2. V is an NxN matrix and orthogonal

    V是NxN矩阵并且正交
  3. D is an MxN matrix and diagonal

    D是MxN矩阵和对角线
  4. Elements of U are the eigenvectors of A(A.T), called left singular vectors

    U的元素是A(AT)的特征向量,称为左奇异向量
  5. Elements of Vare the eigenvectors of (A.T)A, called right singular vectors

    Vare的元素(AT)A的特征向量,称为右奇异向量
  6. Non zero elements of D are the square-root( λ((A.T)(A))) which means square-root of eigenvalues of (A.T)(A), called as singular values

    D的非零元素是平方根(λ((AT)(A))),它表示(AT)(A)特征值的平方根,称为奇异值

结束 (End)

Thank you and stay tuned for more blogs on AI.

谢谢,请继续关注更多有关AI的博客。

翻译自: https://towardsdatascience.com/statistics-for-ai-part-2-43d81986c87c

ai 中 统计

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/388300.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

twitter数据分析_Twitter上最受欢迎的数据科学文章主题

twitter数据分析If you’ve written data science articles or are trying to get started, finding the most popular topics is a big help in getting your articles read. Below are the steps to easily determine what these topics are using R and the results of the …

JAVA遇见HTML——JSP篇(JSP状态管理)

案例:Cookie在登录中的应用 URL编码与解码的工具类解决中文乱码的问题,这个工具类在java.net.*包里 编码:URLEncoder.encode(String s,String enc)//s:对哪个字符串进行编码,enc:用的字符集(例&…

PE文件讲解

我们大家都知道,在Windows 9x、NT、2000下,所有的可执行文件都是基于Microsoft设计的一种新的文件格式Portable Executable File Format(可移植的执行体),即PE格式。有一些时候,我们需要对这些可执行文件进…

是什么使波西米亚狂想曲成为杰作-数据科学视角

平均“命中率”是什么样的 (What an Average ‘Hit’ looks like) Before we break the song down, let us have a brief analysis of what the greatest hits of all time had in common. I have picked 1500 songs ( charting hits ) right from the ’50s to the’10s, spre…

流行编程语言_编程语言的流行度排名

流行编程语言There has never been a unanimous agreement on what the most popular programming languages are, and probably never will be. Yet we believe that there is merit in trying to come up with ways to rank the popularity of programming languages. It hel…

使用UIWebView加载网页

1、使用UIWebView加载网页 运行XCode 4.3&#xff0c;新建一个Single View Application&#xff0c;命名为WebViewDemo。 2、加载WebView 在ViewController.h添加WebView成员变量和在ViewController.m添加实现 [cpp] view plaincopyprint?#import <UIKit/UIKit.h> …

corba的兴衰_数据科学薪酬的兴衰

corba的兴衰意见 (Opinion) 目录 (Table of Contents) Introduction 介绍 Salary and Growth 薪资与增长 Summary 摘要 介绍 (Introduction) In the past five years, data science salary cumulative growth has varied between 12% in the United States, according to Glass…

10 个深恶痛绝的 Java 异常。。

异常是 Java 程序中经常遇到的问题&#xff0c;我想每一个 Java 程序员都讨厌异常&#xff0c;一 个异常就是一个 BUG&#xff0c;就要花很多时间来定位异常问题。 什么是异常及异常的分类请看这篇文章&#xff1a;一张图搞清楚 Java 异常机制。今天&#xff0c;栈长来列一下 J…

如何实施成功的数据清理流程

干净的数据是发现和洞察力的基础。 如果数据很脏&#xff0c;您的团队为分析&#xff0c;培养和可视化数据而付出的巨大努力完全是在浪费时间。 当然&#xff0c;肮脏的数据并不是新的。 它早在计算机变得普及之前就困扰着决策。 现在&#xff0c;计算机技术已普及到日常生活中…

通才与专家_那么您准备聘请数据科学家了吗? 通才还是专家?

通才与专家Throughout my 10-year career, I have seen people often spend their time and energy in passionate debates about what data science can deliver, and what data scientists do or do not do. I submit that these are the wrong questions to focus on when y…

ubuntu opengl 安装

安装相应的库&#xff1a; sudo apt-get install build-essential libgl1-mesa-dev sudo apt-get install freeglut3-dev sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev 实例&#xff1a; #include "GL/glut.h" void…

分享一病毒源代码,破坏MBR,危险!!仅供学习参考,勿运行(vc++2010已编译通过)

我在编译的时候&#xff0c;杀毒软件提示病毒并将其拦截&#xff0c;所以会导致编译不成功。 1>D:\c工程\windows\windows\MBR病毒.cpp : fatal error C1083: 无法打开编译器中间文件:“C:\Users\lenovo\AppData\Local\Temp\_CL_953b34fein”: Permission denied 1> 1>…

数据科学家 数据工程师_数据科学家实际上赚了多少钱?

数据科学家 数据工程师目录 (Table of Contents) Introduction 介绍 Junior Data Scientist 初级数据科学家 Mid-Level Data Scientist 中级数据科学家 Senior Data Scientist 资深数据科学家 Additional Compensation 额外补偿 Summary 摘要 介绍 (Introduction) The lucrativ…

spotify歌曲下载_使用Spotify数据预测哪些“ Novidades da semana”歌曲会成为热门歌曲

spotify歌曲下载TL; DR (TL;DR) Spotify is my favorite digital music service and I’m very passionate about the potential to extract meaningful insights from data. Therefore, I decided to do this article to consolidate my knowledge of some classification mod…

(第三周)周报

此作业要求https://edu.cnblogs.com/campus/nenu/2018fall/homework/2143 1.本周PSP 总计&#xff1a;1422 min 2.本周进度条 (1)代码累积折线图 (2)博文字数累积折线图 4.PSP饼状图 转载于:https://www.cnblogs.com/gongylx/p/9761852.html

功能测试代码python_如何使您的Python代码更具功能性

功能测试代码pythonFunctional programming has been getting more and more popular in recent years. Not only is it perfectly suited for tasks like data analysis and machine learning. It’s also a powerful way to make code easier to test and maintain.近年来&am…

layou split 属性

layou split&#xff1a;true - 显示侧分栏 转载于:https://www.cnblogs.com/jasonlai2016/p/9764450.html

C#Word转Html的类

C#Word转Html的类/**//******************************************************************** created: 2007/11/02 created: 2:11:2007 23:13 filename: D:C#程序练习WordToChmWordToHtml.cs file path: D:C#程序练习WordToChm file bas…

分库分表的几种常见形式以及可能遇到的难题

前言 在谈论数据库架构和数据库优化的时候&#xff0c;我们经常会听到“分库分表”、“分片”、“Sharding”…这样的关键词。让人感到高兴的是&#xff0c;这些朋友所服务的公司业务量正在&#xff08;或者即将面临&#xff09;高速增长&#xff0c;技术方面也面临着一些挑战。…

线性回归和将线拟合到数据

Linear Regression is the Supervised Machine Learning Algorithm that predicts continuous value outputs. In Linear Regression we generally follow three steps to predict the output.线性回归是一种监督机器学习算法&#xff0c;可预测连续值输出。 在线性回归中&…