⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bayesdemo2.m

📁 BAYESDEMO1 demo how to display discriminat function for Bayes classifier.
💻 M
字号:
% BAYESDEMO2 demo on Bayes classifiation and error estimation.% Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac
% (c) Czech Technical University Prague, http://cmp.felk.cvut.cz
% Modifications:% 9-June-2001, V.Franc echo on;% load model (see unsudemo).pause;  % press anykeymodel = load('gaussc2b');% generate randomly testing set (200 patterns) accroding to the model.pause;  % press anykey[Xtst,Itst]=nmix(model.MI, model.SIGMA, model.Pk, 200);% display testing set and Bayes discriminat functionpause;  % press anykeyfigure; hold on;ppoints( Xtst, Itst);pbayescln( model.MI, model.SIGMA, model.Pk, 0, 'k--');% classify testing pointspause;  % press anykey[Ipred]=bayescln(Xtst,model.MI,model.SIGMA,model.Pk);% compute classification error on testing pointspause;  % press anykey100*cerror(Ipred,Itst)% estimate upper limit on mean classification error pause;  % press anykeymi1 = model.MI(:,1); % 1st mean value vectormi2 = model.MI(:,2); % 2nd mean value vectorc1 = acov( model.SIGMA, 1 ); % 1st covariance matrixc2 = acov( model.SIGMA, 2 ); % 2nd covariance matrix100*bhattach(mi1,mi2,c1,c2,model.Pk(1),model.Pk(2))echo off;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -