Bayesian classification- Matlab Code PDF

Title Bayesian classification- Matlab Code
Author re ga
Course pattern recognition
Institution دانشگاه صنعتی امیرکبیر
Pages 5
File Size 56 KB
File Type PDF
Total Downloads 18
Total Views 136

Summary

Download Bayesian classification- Matlab Code PDF


Description

clear; close all; clc %% extract the data dat = xlsread('yeastcellcycle1','C2:S238'); [n , m] = size(dat); % n:number of jenes m:number of features %% initialization y=dat; % k = 1 %order of fourier series p = 2; %dimension of beta time = (0:m-1)'; w = 85; X = [cos(2*pi*time/w) sin(2*pi*time/w)]; qu = m; qv = m; qe = m; g = 4; %number of clusters itmax = 100; %maximum iteration Z1 = eye(m,qu); Z2 = eye(m,qv); [idx,C] = kmeans(dat,g); z = zeros(n,g); for h=1:g z(idx==h,h)=1; end pai=sum(z)/n; a1 = 2*rand(1,g)-1; b1 = rand(1,g); beta = [a1;b1]; sig2 = rand(1,g) * 0.3; omega = ones(m,m,g); for h=1:g omega(:,:,h) = sig2(h) * eye(m,m); end

theta = rand(g,1) * 0.5; rho = rand(g,1); d = rand(g,1) * 0.4; D = zeros(m,m,g); for h=1:g D(:,:,h) = d(h) * eye(m,m); end

A = ones(m,m,g); for h=1:g

for i=1:m for j=1:m if j...


Similar Free PDFs