• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

二进制数据的贝叶斯非参数聚类算法Matlab代码实现

武飞扬头像
wlz249
帮助1

    目录

💥1 概述

📚2 部分运行结果

🎉3 参考文献

👨‍💻4 Matlab代码


💥1 概述

利用图像结构信息是字典学习的难点,针对传统非参数贝叶斯算法对图像结构信息利用不充分,以及算法运行效率低下的问题,该文提出一种二进制数据的贝叶斯非参数聚类算法。

学新通

 学新通

 学新通

 学新通

 学新通

 学新通

🎉3 参考文献

[1]董道广,芮国胜,田文飚,张洋,刘歌.具有聚类结构相似性的非参数贝叶斯字典学习算法[J].电子与信息学报,2020,42(11):2765-2772.

👨‍💻4 Matlab代码

clear all;
%% add paths to codes and data
addpath('Visualization/export_fig/');
addpath('Visualization/');
addpath('BNPBDCA/');
addpath('data/Chemotherapy/')
addpath('data/misc/');

outdir='results\Chemotherapy\'; % define output directory, change if necessary
if exist(outdir)~=7
mkdir(outdir);
end
% select chemotherapy drugs
interesting_drugs={'Doxorubicin', 'Etoposide', 'Gemcitabine', 'Cisplatin','Docetaxel', 'Methotrexate'}
%% Read data
data=dlmread('binary_data.txt');
cell_lines=textread('cell_lines.txt','%s');
headers=textread('headers.txt','%s');
data_mut=data(:,14:21);%mutation data
Id=sum(data_mut,2)~=0;%find cell lines that have no mutations
Im=ismember(headers,interesting_drugs);
Im(1:21)=true;
data=data(Id,Im);
cell_lines=cell_lines(Id);
headers=headers(Im);
size(data)

%% Initialize parameters and hyper parameters
fact=0.9; % cooling factor
NOIT=500; % no of iterations
alpha=1; % beta parameter
beta=betaparams(data); % beta parameter
gamma=1; % Dirichlet parameter
T=1; % initial temperature
labels=1:size(data,1); % initial labels
c=clust2(data(:,:),NOIT,[outdir 'outfile.txt'],labels,fact,alpha,beta,gamma,T);% cluster data

%% Visualization
map=flipud(brewermap([],'RdYlBu'));
figure;imagesc(data);colormap(map);
export_fig(gcf,[outdir 'data'],'-jpg','-q100','-r300','-transparent');
plot_clusters(c,data,[0 0 800 900]);colormap(map);set(gca,'YDir','normal','XTick',1:length(headers),'XTickLabel',headers,'FontSize',12);rotateXLabels(gca,-45);
export_fig(gcf,[outdir 'clustered_data'],'-jpg','-q100','-r300','-transparent');
plot_clusters1(c,data,headers,outdir,-1,[0 0 900 250]);


 

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhghfhbc
系列文章
更多 icon
同类精品
更多 icon
继续加载