我正在尝试学习贝叶斯网络,我有一个问题,我想澄清一下。
给出表格
p(攻击性=高|愤怒=部分,敌意=是)会是什么?我的答案是0.5。
我的思维过程是愤怒和敌意是依赖的,所以根据给出的信息,部分愤怒和是敌意的概率是0.5。
侵略与两者无关,所以它只是P(攻击性)* 0.5 = 0.5。
这是一个正确的假设吗?
答案 0 :(得分:0)
简短回答:我p(Aggression=high|Anger=Partly,Hostility=Yes)
的价值是100%.
如果侵略是独立的敌对和愤怒,那么你有什么证据并不重要。 所以p(侵略)是3个值p(Agg =低),p(Agg =高),p(Agg =非常高)的最大值。
然而,3 * 9表意味着p(Agg)= p(Hos,Ang)并且它不独立。
我尝试使用免费软件“Samiam”为您的CPT(上表)建模 我这样做了,我已经从Samiam的CPT中为Aggression节点输入了值。 对于先辈们:我假设有人在5%的时间处于愤怒状态,15%的时间部分生气,80%的人不生气;和敌对的10%的时间,部分敌对的30%或60%的时间没有敌意。
我还附上了samiam文件:
net
{
propagationenginegenerator1791944048146838126L = "edu.ucla.belief.approx.BeliefPropagationSettings@20ece334";
recoveryenginegenerator6944530267470113528l = "edu.ucla.util.SettingsImpl@49f77e1b";
node_size = (130.0 55.0);
huginenginegenerator3061656038650325130L = "edu.ucla.belief.inference.JoinTreeSettings@71a1d859";
}
node Aggression
{
states = ("Low" "High" "VeryHigh" );
position = (268 -263);
diagnosistype = "AUXILIARY";
DSLxSUBMODEL = "Root Submodel";
ismapvariable = "false";
ID = "variable2";
label = "Aggression";
DSLxEXTRA_DEFINITIONxDIAGNOSIS_TYPE = "AUXILIARY";
excludepolicy = "include whole CPT";
}
node Anger
{
states = ("no" "partly" "yes" );
position = (118 -48);
diagnosistype = "AUXILIARY";
DSLxSUBMODEL = "Root Submodel";
ismapvariable = "false";
ID = "variable0";
label = "Anger";
DSLxEXTRA_DEFINITIONxDIAGNOSIS_TYPE = "AUXILIARY";
excludepolicy = "include whole CPT";
}
node Hostility
{
states = ("No" "Partly" "Yes" );
position = (351 -46);
diagnosistype = "AUXILIARY";
DSLxSUBMODEL = "Root Submodel";
ismapvariable = "false";
ID = "variable1";
label = "Hostility";
DSLxEXTRA_DEFINITIONxDIAGNOSIS_TYPE = "AUXILIARY";
excludepolicy = "include whole CPT";
}
potential ( Aggression | Anger Hostility )
{
data = ((( 1.0 0.0 0.0 )
( 0.5 0.5 0.0 )
( 0.5 0.0 0.5 ))
(( 0.5 0.5 0.0 )
( 0.5 0.5 0.0 )
( 0.0 1.0 0.0 ))
(( 0.5 0.0 0.5 )
( 0.0 0.5 0.5 )
( 0.0 0.0 1.0 )));
}
potential ( Anger | )
{
data = ( 0.8 0.15 0.05 );
}
potential ( Hostility | )
{
data = ( 0.6 0.3 0.1 );
}