首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > pybayeslogic

pybayeslogic

  • 资源大小:45.36 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

PyBLOG Introduction PyBLOG is an implementation of BLOG in Python. It substitutes functions in first order logic with python functions and dependency statements in the BLOG language with Python functions which return a distribution object. To get started, simply download the source and add the PyBayesLogic-0.1.0/ directory to your PYTHONPATH. Alternatively, you can also use python setup.py install. A trivial PyBLOG example Consider the following code fragment: ``` from pyblog import * @var_dist def X(): return Normal(100,1) @var_dist def Y(i): return Normal(X(), 1) ans, = query([X()], [Y(0)==110, Y(1)==106]) print ans.mean(), ans.std_dev() ``` This defines a variable X() which has a Normal distribution and another set of variables Y(.) which have a Normal distribution with mean X(). We want to query the distrib

文 件 列 表

PyBayesLogic-0.1.0
LICENSE.txt
PKG-INFO
README.txt
setup.py
pyblog
glob.py
test
testcite.py

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP