• matlab计算马氏平方距离


    马氏距离计算一个点到一个参考分布的距离。马氏距离的优点是不受各个维度特征尺度的影响(尺度无关)。

    d2 = mahal(Y, X)

    d2 = mahal(Y,X) returns the squared Mahalanobis distance of each observation in Y to the reference samples in X.

    返回Y中每个点相对于参考分布X的马氏平方距离。即Y_i与分布p(mu, cov)的距离,这里mu, cov通过X进行估计。

    The Mahalanobis distance is a measure between a sample point and a distribution.

    The Mahalanobis distance from a vector y to a distribution with mean μ and covariance Σ is

    This distance represents how far y is from the mean in number of standard deviations.

    mahal returns the squared Mahalanobis distance d2 from an observation in Y to the reference samples in X. In the mahal function, μ and Σ are the sample mean and covariance of the reference samples, respectively.

    因此,计算一个向量中各点(或向量)到自身分布的马氏平方距离表示为:

    d2 = mahal(X, X)
    

    计算一个向量中各点(或向量)到另一个参考分布的马氏平方距离表示为:

    d2 = mahal(Y, X)
    

      

     

     

     

    快去成为你想要的样子!
  • 相关阅读:
    【Opencv】直方图函数 calchist()
    【Lintcode】070.Binary Tree Level Order Traversal II
    【C++】*p++ = *p不同环境下操作不同
    【Python】String 字符串
    【Python】File IO
    栈和队列
    链表
    printf 的格式
    Linux的基本指令--
    机器人的运动范围
  • 原文地址:https://www.cnblogs.com/jiangkejie/p/15209045.html
Copyright © 2020-2023  润新知