证据权法是通过计算和利用各种不同证据的权重(表示相对重要性)并将多种证据结合起来,预测某个时间是否会发生的一种方法
证据权法以概率论中的贝叶斯定理为基础。设D表示要一个随机事件。用P(D)表示这一事件概率,即D发生的概率。假设P(D)事先知道,即它是先验概率。则D不发生的概率为:
定义:
称为事件D的几率(Odd Ratio),也称优势率,它能更好的表示事件D发生的可能性大小。
用集合
表示与D有关的n个证据,并设Xj都是逻辑变量。用D|X表示"单元中存在X的情况下D发生"这一事件。用P(D|X)表示概率,也称为后验概率(后验概率是获得有关信息后对先验概率修正后的概率)。由贝叶斯定理:
可以得出优势率:
假设n个条件相互条件独立,并在两边同时去对数:
令:
于是:
事件D|X的几率为
于是后验概率为:
其中wi称为证据X的证据权,反应Xi的存在对D的重要性:
其中,各条件概率的计算:
定义:
为X的对比系数,可以用来综合评价各证据的重要性
在数据较少的情况下,采用C来选择证据,回增大结果的不确定性,定义
其中:为第i个证据后验概率的正负方差:
-
/// <summary>
-
/// 计算先验似然概率
-
/// </summary>
-
private void GetMinePriorLikelihoodProb()
-
{
-
mineral_PriorProbability = sum_EvidenceCount[0] / (double)gridNumber;
-
minreal_PriorLiklihoodProbablity = mineral_PriorProbability / (1 - mineral_PriorProbability);
-
}
-
/// <summary>
-
/// 计算证据权参数
-
/// </summary>
-
private void GetEvidenceStatistc()
-
{
-
for (int i = 0; i < mineral_EvidenceCount - 1; i++)
-
{
-
//证据权正定义
-
/* Count(BjD)/Count(D)
-
* ln----------------------
-
* Count(Bj~D)/Count(~D)
-
*/
-
evidence_PosWeight[i] = Math.Log((sumEvidence_MineralOccur[i] / sum_EvidenceCount[0]) /
-
((sum_EvidenceCount[i + 1] - sumEvidence_MineralOccur[i]) / (gridNumber - sum_EvidenceCount[0])));
-
-
//证据权负定义
-
/* Count(~BjD)/Count(D)
-
* ln-------------------------
-
* Count(~Bj~D)/Count(~D)
-
*/
-
evidence_NegWeight[i] = Math.Log(((sum_EvidenceCount[0] - sumEvidence_MineralOccur[i]) / (sum_EvidenceCount[0]))
-
/ ((gridNumber - sum_EvidenceCount[0] - sum_EvidenceCount[i + 1] + sumEvidence_MineralOccur[i]) / (gridNumber - sum_EvidenceCount[0])));
-
-
//证据权正方差
-
/* 1 1
-
* -----------+--------------
-
* Count(BjD) Count(Bj~D)
-
*/
-
evidence_PosVariance[i] = (1 / sumEvidence_MineralOccur[i]) +
-
(1 / (sum_EvidenceCount[i + 1] - sumEvidence_MineralOccur[i]));
-
-
//证据权负方差
-
/* 1 1
-
* -----------+--------------
-
* Count(~BjD) Count(~Bj~D)
-
*/
-
evidence_NegVariance[i] = (1 / (sum_EvidenceCount[0] - sumEvidence_MineralOccur[i])) +
-
(1 / (gridNumber - sum_EvidenceCount[0] - sum_EvidenceCount[i + 1] + sumEvidence_MineralOccur[i]));
-
-
//对比度
-
//Cj=weightj+ - Weightj-
-
evidence_ContrastRatio[i] = evidence_PosWeight[i] - evidence_NegWeight[i];
-
-
//显著性统计量
-
//Stud(C)=Cj/s(c)
-
//s(c)=1/Sqrt(s2(weight+)+s2(weight-))
-
evidence_StatisticalSignficance[i] = evidence_ContrastRatio[i] /
-
(Math.Sqrt(evidence_PosVariance[i] + evidence_NegVariance[i]));
-
}
-
}
-
/// <summary>
-
/// 证据权合成
-
/// </summary>
-
private void SynthesisEvidence()
-
{
-
double[] evidence_PostProbLog = new double[gridNumber];
-
-
double[,] evidence_Data = (double[,])mineralAndEvidence.Clone();
-
for (int i = 1; i < mineral_EvidenceCount; i++)
-
{
-
for (int j = 0; j < mineralAndEvidence.GetLength(1); j++)
-
{
-
//将复制证据图层中与对调
-
if (evidence_Data[i, j] == 0)
-
{
-
evidence_Data[i, j] = 1;
-
}
-
else
-
{
-
evidence_Data[i, j] = 0;
-
}
-
evidence_PostProbLog[j] += evidence_Data[i, j] * evidence_NegWeight[i - 1] +
-
mineralAndEvidence[i, j] * evidence_PosWeight[i - 1];
-
}//for
-
}//for
-
GetPostProb(evidence_PostProbLog);
-
}//Method End
-
/// <summary>
-
/// 计算后验概率
-
/// </summary>
-
/// <param name="postProbLog"></param>
-
private void GetPostProb(double[] postProbLog)
-
{
-
evidence_PostProb = new double[gridNumber];
-
for (int i = 0; i < postProbLog.Length; i++)
-
{
-
evidence_PostProb[i] = (Math.Exp(postProbLog[i] + Math.Log(minreal_PriorLiklihoodProbablity)))
-
/ (1 + Math.Exp(postProbLog[i] + Math.Log(minreal_PriorLiklihoodProbablity)));
-
}//for
-
}