多变量数据的嵌入参数估计(Matlab代码实现)

简介: 多变量数据的嵌入参数估计(Matlab代码实现)

💥1 概述

在统计信号处理及其相关领域 ,多变量数据的描述和分析一直是人们广泛关注的研究课题。在现有的多变量数据分析方法中 ,基于二阶统计特性的主分量分析 (PCA)和基于高阶统计特性的独立分量分析 (ICA)是两种非常有代表性的方法。本文在简要介绍PCA和ICA基本原理的基础上 ,结合计算平均互信息 (AMI) 和假最近邻 (FNN)以估计多维时间序列的嵌入参数,对两种方法的性能和特点进行了较深入地比较。近年来,互联网和物联网的融合与发展,吸引众多学者对复杂网络进行研究。复杂网络的研究在众多领域具有重要的应用价值,例如在生物领域检测蛋白质作用的复合体,在商业领域进行商品推荐,在公共安全领域预防犯罪活动等。提出了一种基于平均互信息的聚类算法。通过熵量化参数类别特性的大小,再根据熵的平均互信息计算方法衡量数据对象间类别的相同、相异特征量,统一数值和分类条件属性参数间距离的数量级,最后通过优化迭代自适应过程得到最终聚类结果。具有缺失数据的随机系数自回归模型的参数估计问题,在缺失数据情形下给出了四种模型参数估计方法:无数据填充条件最小二乘法、均值填充法、条件均值填充法以及桥填充法。


📚2 运行结果

部分代码:

%% Using |mdDelay()| and |mdFnn()| to estimate embedding of the Lorenz attractor
% 
% This file contains examples of how to use the functions mdDelay and mdFnn
% on example data from the Lorenz equations. This script was used to
% produce Figure 1 and Figure 2 in the article, but also contains some
% additional examples of calling the functions and plotting the results.
%
% For further details, we refer to the article:
%
% Wallot, S., & M鴑ster, D. (2018). Calculation of average mutual
% information (AMI) and false-nearest neighbors (FNN) for the estimation of
% embedding parameters of multidimensional time-series in Matlab. Front.
% Psychol. - Quantitative Psychology and Measurement (under review)
%% Load the data and set font size for plots
data = load('lorenz_3d_timeseries.txt');
fontSize = 18;
%% Plot the full Lorenz attractor (Figure 1a in the article)
figure1a = figure;
set(gcf,'color','white')
axes1a = axes('Parent',figure1a);
hold(axes1a,'on');
plot3(data(:,1),data(:,2),data(:,3),'k')
xlabel('x')
ylabel('y')
zlabel('z')
view(axes1a,[67 25]);
set(gca,'FontSize',fontSize,'fontWeight','normal')
print('Figure1a','-dpng')
%% Estimate the time delay for the x-variable
% The estimate returned here is 19, which in this case is higher than it
% needs to be. This can bee seen from the plot, where the AMI function does
% not drop below the threshold value of 1/e. The function thus falls back
% to finding the first local minimum which occurs at a delay of 19. Since
% the AMI function is very flat (the first derivative is almost zero), a
% value very close to the first local minimum occurs already at a delay of
% 13 or 14, so there is no reason to choose a larger value than that.
%
% This shows the importance of visually inspecting the results. For y and z
% the algorithm produces values that hold up to visual inspection, and the
% same is true for the combinations xy, xz, yz and xyz (see plots further
% below).
tau = mdDelay(data(:,1), 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('x: tau = ' + string(tau))
%% Construct time delayed versions of the x-variable (Figure 1b-d in the article)
% To see the effect in the plot we use an exaggerated value of tau, so for 
% illustration purposes we set tau = 40.
tau = 40;
figure();
set(gcf,'color','white')
% Plot the x variable
subplot(3,1,1), plot(data(:,1),'k')
ylabel('x')
axis([0 2000 min(data(:,1)) max(data(:,1))])
set(gca,'FontSize',fontSize,'fontWeight','normal')
set(findall(gcf,'type','text'),'FontSize',fontSize,'fontWeight','normal')
% Plot the x variable delayed by tau
subplot(3,1,2), plot(data(1 + tau:end,1),'k')
ylabel('x')
axis([0 2000 min(data(:,1)) max(data(:,1))])
set(gca,'FontSize',fontSize,'fontWeight','normal')
set(findall(gcf,'type','text'),'FontSize',fontSize,'fontWeight','normal')
subplot(3,1,3), plot(data(1 + 2 * tau:end,1),'k')
ylabel('x')
xlabel('time')
axis([0 2000 min(data(:,1)) max(data(:,1))])
set(gca,'FontSize',fontSize,'fontWeight','normal')
set(findall(gcf,'type','text'),'FontSize',fontSize,'fontWeight','normal')
%% Reconstruct the attractor based on the x time series (Figure 1e in the article)
% The x time series is embedded using time delayed versions of the time
% series with a time delay tau and embedding dimension m.
% As discussed above, visual inspection of the AMI function indicates that
% the first local minimium value is too high a value for tau, since the AMI
% reaches essentially the same level at tau around 13, so we will pick this
% value. The embedding dimension is set to 3, which is the value produced by
% mdFnn() (see Table 1 in the article).
tau = 13;
m = 3;
figure1e = figure();
set(gcf,'color','white')
axes1e = axes('Parent',figure1e);
hold(axes1e,'on');
plot3(data(1:end-(m-1)*tau,1),data(1+tau:end-(m-2)*tau,1),data(1+2*tau:end,1),'k')
xlabel('x')
ylabel('y')
zlabel('z')
view(axes1e,[67 25]);
set(gca,'FontSize',fontSize,'fontWeight','normal')
set(findall(gcf,'type','text'),'FontSize',fontSize,'fontWeight','normal')
%% Estimate time delay and plot AMI using all variables (Figure 2a in article)
tau = mdDelay(data, 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('xyz: tau = ' + string(tau))
print('Figure2a','-dpng')
%% Estimate the embedding dimension (Figure 2b in the article)
[fnnPercent, embeddingDimension] = mdFnn(data, round(tau));
set(gca,'FontSize',fontSize,'fontWeight','normal')
print('Figure2b','-dpng')
%% Alternative method to find time delay using first local minimum criterion
tau = mdDelay(data, 'maxLag', 25, 'plottype', 'all', 'criterion', 'localMin');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('xyz: tau = ' + string(tau))
%% Plot the average AMI and standard deviation
tau = mdDelay(data, 'maxLag', 25, 'plottype', 'mean');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('xyz: tau = ' + string(tau))
%% Time delay for the y-variable
tau = mdDelay(data(:,2), 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('y: tau = ' + string(tau))
%% Time delay for the z-variable
tau = mdDelay(data(:,3), 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('z: tau = ' + string(tau))
%% Time delay for the x and y variables
tau = mdDelay(data(:,1:2), 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('xy: tau = ' + string(tau))
%% Time delay for the x and z variables
tau = mdDelay(data(:,[1,3]), 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('xz: tau = ' + string(tau))
%% Time delay for the y and z variables
tau = mdDelay(data(:,2:3), 'maxLag', 25, 'plottype', 'all');
set(gca,'FontSize',fontSize,'fontWeight','normal')
disp('yz: tau = ' + string(tau))

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]顾兴源.大系统参数估计[J].东北工学院学报,1981(01):91-107.

[2]周宏志,孙健,顾海鹏.多变量数据分析的研究与应用[J].炼油与化工,2013,24(05):19-21.DOI:10.16049/j.cnki.lyyhg.2013.05.019.

🌈4 Matlab代码实现


相关文章
|
18天前
|
算法 数据安全/隐私保护 计算机视觉
基于二维CS-SCHT变换和LABS方法的水印嵌入和提取算法matlab仿真
该内容包括一个算法的运行展示和详细步骤,使用了MATLAB2022a。算法涉及水印嵌入和提取,利用LAB色彩空间可能用于隐藏水印。水印通过二维CS-SCHT变换、低频系数处理和特定解码策略来提取。代码段展示了水印置乱、图像处理(如噪声、旋转、剪切等攻击)以及水印的逆置乱和提取过程。最后,计算并保存了比特率,用于评估水印的稳健性。
|
3天前
|
机器学习/深度学习 算法 数据安全/隐私保护
基于DCT变换和位平面分解的数字水印嵌入提取算法matlab仿真
这是一个关于数字水印算法的摘要:使用MATLAB2022a实现,结合DCT和位平面分解技术。算法先通过DCT变换将图像转至频域,随后利用位平面分解嵌入水印,确保在图像处理后仍能提取。核心程序包括水印嵌入和提取,以及性能分析部分,通过PSNR和NC指标评估水印在不同噪声条件下的鲁棒性。
|
4天前
|
算法 数据安全/隐私保护 C++
基于二维CS-SCHT变换和扩频方法的彩色图像水印嵌入和提取算法matlab仿真
该内容是关于一个图像水印算法的描述。在MATLAB2022a中运行,算法包括水印的嵌入和提取。首先,RGB图像转换为YUV格式,然后水印通过特定规则嵌入到Y分量中,并经过Arnold置乱增强安全性。水印提取时,经过逆过程恢复,使用了二维CS-SCHT变换和噪声对比度(NC)计算来评估水印的鲁棒性。代码中展示了从RGB到YUV的转换、水印嵌入、JPEG压缩攻击模拟以及水印提取的步骤。
|
9天前
|
机器学习/深度学习 算法
m基于GA-GRU遗传优化门控循环单元网络的电力负荷数据预测算法matlab仿真
在MATLAB 2022a中,一个基于遗传算法优化的GRU网络展示显著优化效果。优化前后的电力负荷预测图表显示了改进的预测准确性和效率。GRU,作为RNN的一种形式,解决了长期依赖问题,而遗传算法用于优化其超参数,如学习率和隐藏层单元数。核心MATLAB程序执行超过30分钟,通过迭代和适应度评估寻找最佳超参数,最终构建优化的GRU模型进行负荷预测,结果显示预测误差和模型性能的提升。
26 4
|
18天前
|
资源调度 算法 块存储
m基于遗传优化的LDPC码OMS译码算法最优偏移参数计算和误码率matlab仿真
MATLAB2022a仿真实现了遗传优化的LDPC码OSD译码算法,通过自动搜索最佳偏移参数ΔΔ以提升纠错性能。该算法结合了低密度奇偶校验码和有序统计译码理论,利用遗传算法进行全局优化,避免手动调整,提高译码效率。核心程序包括编码、调制、AWGN信道模拟及软输入软输出译码等步骤,通过仿真曲线展示了不同SNR下的误码率性能。
19 1
|
18天前
|
算法 Serverless
m基于遗传优化的LDPC码NMS译码算法最优归一化参数计算和误码率matlab仿真
MATLAB 2022a仿真实现了遗传优化的归一化最小和(NMS)译码算法,应用于低密度奇偶校验(LDPC)码。结果显示了遗传优化的迭代过程和误码率对比。遗传算法通过选择、交叉和变异操作寻找最佳归一化因子,以提升NMS译码性能。核心程序包括迭代优化、目标函数计算及性能绘图。最终,展示了SNR与误码率的关系,并保存了关键数据。
22 1
|
18天前
|
算法 数据安全/隐私保护
matlab程序,傅里叶变换,频域数据,补零与不补零傅里叶变换
地震波格式转换、时程转换、峰值调整、规范反应谱、计算反应谱、计算持时、生成人工波、时频域转换、数据滤波、基线校正、Arias截波、傅里叶变换、耐震时程曲线、脉冲波合成与提取、三联反应谱、地震动参数、延性反应谱、地震波缩尺、功率谱密度
|
18天前
|
数据安全/隐私保护
matlab 曲线光滑,去毛刺,去离群值,数据滤波,高通滤波,低通滤波,带通滤波,带阻滤波
地震波格式转换、时程转换、峰值调整、规范反应谱、计算反应谱、计算持时、生成人工波、时频域转换、数据滤波、基线校正、Arias截波、傅里叶变换、耐震时程曲线、脉冲波合成与提取、三联反应谱、地震动参数、延性反应谱、地震波缩尺、功率谱密度
|
18天前
|
数据安全/隐私保护
时域与频域数据互相转换,傅里叶变换与逆傅里叶变换,matlab程序,时域转频域
地震波格式转换、时程转换、峰值调整、规范反应谱、计算反应谱、计算持时、生成人工波、时频域转换、数据滤波、基线校正、Arias截波、傅里叶变换、耐震时程曲线、脉冲波合成与提取、三联反应谱、地震动参数、延性反应谱、地震波缩尺、功率谱密度
|
18天前
|
机器学习/深度学习 算法 数据安全/隐私保护
基于有序抖动块截断编码的水印嵌入和提取算法matlab仿真
这是一个关于数字图像水印嵌入的算法介绍。使用MATLAB2022a,该算法基于DOTC,结合抖动和量化误差隐藏,确保水印的鲁棒性和隐蔽性。图像被分为N*N块,根据水印信号进行二值化处理,通过调整重建电平的奇偶性嵌入水印。水印提取是嵌入过程的逆操作,通过重建电平恢复隐藏的水印比特。提供的代码片段展示了从块处理、水印嵌入到噪声攻击模拟及水印提取的过程,还包括PSNR和NC的计算,用于评估水印在不同噪声水平下的性能。

热门文章

最新文章