📄 learn_struct_tan.m.svn-base
字号:
function dag = learn_struct_tan(data, class_node, root, node_sizes, scoring_fn)% LEARN_STRUCT_TAN Learn the structure of the tree augmented naive bayesian network % (with discrete nodes)% dag = learn_struct_tan(app, class, root)%% Input :% data(i,m) is the value of node i in case m% class_node is the class node% root is the root node of the tree part of the dag (must be different from the class node)% node_sizes = 1 if gaussian node,% scoring_fn = 'bic' (default value) or 'mutual_info'%% Output :% dag = adjacency matrix of the dag%% V1.1 : 21 may 2003, (O. Francois, Ph. Leray)if nargin <4 error('Requires at least 4 arguments.')endif nargin == 4 scoring_fn='bic';end;if class_node==root error(' The root node can''t be the class node.');endif root>class_node root=root-1;endN=size(data,1);node_types=cell(N-1,1);for i=1:N-1 node_types{i}='tabular';enddag=zeros(N);notclass=setdiff(1:N,class_node);T = learn_struct_mwst(data(notclass,:), ones(1,N-1), node_sizes(notclass), node_types, scoring_fn, root);dag(class_node,notclass)=1;dag(notclass,notclass)=T;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -