异常检测RX算法

来源:互联网 发布:java nio网络编程 编辑:程序博客网 时间:2024/04/30 22:49

这里写图片描述

出处:Regularization for spectral matched filter and RX anomaly detector

function [result] = RxDetector(X)% Inputs%   X  - 2D data matrix (p x N)% Outputs%   result - Detector output (1 x N)%   sigma - Covariance matrix (p x p)%   sigmaInv - Inverse of covariance matrix (p x p)% Remove the data mean[p, N] = size(X);mMean = mean(X, 2);B = X - repmat(mMean, 1, N);% Compute covariance matrix of backgroundsigma = (B*B.')/(N-1);sigmaInv = inv(sigma);result = zeros(N, 1);for i=1:N    result(i) = B(:,i).'*sigmaInv*B(:,i);endresult = abs(result);return;
0 0
原创粉丝点击