淘宝店卖杯子咋推广咋做9.9包邮的爆款有作用吗( 三 )


Element root = document.getRootElement();
List\u0026lt;Element\u0026gt; prior = root.elements();

priorPositive = Double.valueOf(prior.get(0).attributeValue("pPositive"));
priorNegative = Double.valueOf(prior.get(0).attributeValue("pNegative"));
priorUnsure = Double.valueOf(prior.get(0).attributeValue("pUnsure"));

} catch (DocumentException e) {
e.printStackTrace();
}
}

//获得后验概率
public void getBack() {
SAXReader sax = new SAXReader();
try {
//从这读取weight的值
Document document = sax.read(new File("/home/geekgao/weight.xml"));
Element root = document.getRootElement();
List\u0026lt;Element\u0026gt; back = root.elements();

backNegative = new HashMap\u0026lt;String, Double\u0026gt;();
backPositive = new HashMap\u0026lt;String, Double\u0026gt;();
backUnsure = new HashMap\u0026lt;String, Double\u0026gt;();

double backPos;//积极后验概率
double backNeg;//消极后验概率
double backUns;//不确定后验概率
String word;


推荐阅读