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

📄 scgcpot.m

📁 贝叶斯网络的matlab实现。可以创建贝叶斯网络、训练模型
💻 M
字号:
function pot = scgcpot(cheadsize, ctailsize, p, A, B, C)
% SCGCPOT Make a base object of stable conditional gaussian potential.
% pot = scgcpot(cheadsize, ctailsize, p, A, B, C)
%
% cheadsize is the demension of head nodes.
% ctailsize is the demension of tail nodes.
% r = cheadsize, s = ctailsize
% p is discrete probability.
% A is table of r*1 vectors;
% B is r*s matrices
% C is r*r positive semidefinite symmetric matrices

if nargin < 3
    p = 1; 
end
if nargin < 4
    A = zeros(cheadsize,1); 
end
if nargin < 5
    B = zeros(cheadsize,ctailsize); 
end
if nargin < 6
    C = zeros(cheadsize,cheadsize); 
end

if isempty(A)
    A = zeros(cheadsize,1); 
end
if isempty(B)
    B = zeros(cheadsize,ctailsize); 
end
if isempty(C)
    C = zeros(cheadsize,cheadsize); 
end
  
pot.cheadsize = cheadsize;
pot.ctailsize = ctailsize;

pot.p = p;
pot.A = A;
pot.B = B;
pot.C = C;
%if cheadsize == 0
%   pot.A = [];
%end
%if ctailsize == 0
%    pot.B = [];
%end
pot = class(pot, 'scgcpot');

⌨️ 快捷键说明

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