• 大小: 565KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-17
  • 语言: Python
  • 标签: 开源  

资源简介

bayespy, 贝叶斯 python BayesPy - 贝叶斯 pythonBayesPy提供了使用 python 进行贝叶斯推理的工具。 用户将模型构建为贝叶斯网络,观察数据并运行后推理。 目标是为专家用户提供高效。灵活。可以扩展的工具,但也可以以访问更多的用户。目前

资源截图

代码片段和文件信息

#!/usr/bin/env python

################################################################################
# Copyright (C) 2011-2015 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################


import os
import versioneer


meta = {}
base_dir = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(base_dir ‘bayespy‘ ‘_meta.py‘)) as fp:
    exec(fp.read() meta)

NAME         = ‘bayespy‘
DEscriptION  = ‘Variational Bayesian inference tools for Python‘
AUTHOR       = meta[‘__author__‘]
AUTHOR_EMAIL = meta[‘__contact__‘]
URL          = ‘http://bayespy.org‘
VERSION      = versioneer.get_version()
COPYRIGHT    = meta[‘__copyright__‘]


if __name__ == “__main__“:

    import os
    import sys

    python_version = int(sys.version.split(‘.‘)[0])
    if python_version < 3:
        raise RuntimeError(“BayesPy requires Python 3. You are running Python “
                           “{0}.“.format(python_version))

    # This is annoying: Because readthedocs.org doesn‘t support depending on
    # h5py we need to remove that dependency if we are on the readthedocs
    # servers..
    ON_RTD = os.environ.get(‘READTHEDOCS‘) == ‘True‘
    if ON_RTD:
        # Workaround for https://github.com/rtfd/readthedocs.org/issues/2149
        install_requires = [
            ‘sphinx>=1.4.0‘
        ]
    else:
        install_requires = [
            ‘numpy>=1.10.0‘ # 1.10 implements broadcast_to
                             # 1.8 implements broadcasting in numpy.linalg
            ‘scipy>=0.13.0‘ # <0.13 have a bug in special.multigammaln
            ‘h5py‘
        ]

    # Utility function to read the README file.
    # Used for the long_description.  It‘s nice because now 1) we have a top level
    # README file and 2) it‘s easier to type in the README file than to put a raw
    # string in below ...
    def read(fname):
        return open(os.path.join(os.path.dirname(__file__) fname)).read()

    from setuptools import setup find_packages

    # Setup for BayesPy
    setup(
        install_requires = install_requires
        extras_require = {
            ‘doc‘: [
                ‘sphinx>=1.4.0‘ # 1.4.0 adds imgmath extension
                ‘sphinxcontrib-tikz>=0.4.2‘
                ‘sphinxcontrib-bayesnet‘
                ‘sphinxcontrib-bibtex‘
                ‘numpydoc>=0.5‘
                ‘nbsphinx‘
            ]
            ‘dev‘: [
                ‘nose‘
                ‘nosebook‘
            ]
        }
        packages         = find_packages()
        package_data     = {
            NAME: [“tests/baseline_images/test_plot/*.png“]
        }
        name             = NAME
        version          = VERSION
        author           = AUTHOR
        author_email     = AUTHOR_EMAIL
        description      = DEscriptION
        url              = URL
        long_description = read(‘README.rst‘)
        cmdclass         = versioneer.get_c

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-01-07 09:40  bayespy-master\
     文件         124  2019-01-07 09:40  bayespy-master\.coveragerc
     文件          33  2019-01-07 09:40  bayespy-master\.gitattributes
     文件         329  2019-01-07 09:40  bayespy-master\.gitignore
     文件        3189  2019-01-07 09:40  bayespy-master\.travis.yml
     目录           0  2019-01-07 09:40  bayespy-master\.vscode\
     文件           0  2019-01-07 09:40  bayespy-master\.vscode\temp.sql
     文件        8681  2019-01-07 09:40  bayespy-master\CHANGELOG.rst
     文件        6150  2019-01-07 09:40  bayespy-master\INSTALL.rst
     文件        1090  2019-01-07 09:40  bayespy-master\LICENSE
     文件         333  2019-01-07 09:40  bayespy-master\MANIFEST.in
     文件        5220  2019-01-07 09:40  bayespy-master\README.rst
     目录           0  2019-01-07 09:40  bayespy-master\bayespy\
     文件         572  2019-01-07 09:40  bayespy-master\bayespy\__init__.py
     文件         168  2019-01-07 09:40  bayespy-master\bayespy\_meta.py
     文件       16768  2019-01-07 09:40  bayespy-master\bayespy\_version.py
     目录           0  2019-01-07 09:40  bayespy-master\bayespy\demos\
     文件           0  2019-01-07 09:40  bayespy-master\bayespy\demos\__init__.py
     文件        3332  2019-01-07 09:40  bayespy-master\bayespy\demos\annealing.py
     文件        3429  2019-01-07 09:40  bayespy-master\bayespy\demos\black_box.py
     文件         907  2019-01-07 09:40  bayespy-master\bayespy\demos\categorical.py
     文件        3284  2019-01-07 09:40  bayespy-master\bayespy\demos\collapsed_cg.py
     文件         484  2019-01-07 09:40  bayespy-master\bayespy\demos\gamma_shape.py
     文件        4839  2019-01-07 09:40  bayespy-master\bayespy\demos\hmm.py
     文件        7241  2019-01-07 09:40  bayespy-master\bayespy\demos\lda.py
     文件       10690  2019-01-07 09:40  bayespy-master\bayespy\demos\lssm.py
     文件       10707  2019-01-07 09:40  bayespy-master\bayespy\demos\lssm_sd.py
     文件       14726  2019-01-07 09:40  bayespy-master\bayespy\demos\lssm_tvd.py
     文件        3110  2019-01-07 09:40  bayespy-master\bayespy\demos\mog.py
     文件        3944  2019-01-07 09:40  bayespy-master\bayespy\demos\pattern_search.py
     文件        4657  2019-01-07 09:40  bayespy-master\bayespy\demos\pca.py
............此处省略169个文件信息

评论

共有 条评论