rtnorm:抽样截断的单正态分布

  • e8_679738
    了解作者
  • 664.9KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-02 21:50
    上传日期
rtnorm 抽样截断了单态正态分布。 此回购包含python和matlab软件包,用于基于以下代码模拟截断的正态随机变量: ,它是根据文章的。 Python 对于python,要求为: scipy(将被删除) NumPy 赛顿 openmp(可以在setupy.py中关闭该选项) pip -e 'git+https://git@github.com/JonasWallin/rtnorm.git#egg=rtnorm&subdirectory=python/rtnorm' 要使用采样器: import rtnorm sampler = rtnorm.rtnorm() X = sampler(a = 1, b = 2, mu = 3, sigma = 4) 或带有向量: import rtnorm import numpy as np X = sampler( a =
rtnorm-master.zip
内容介绍
# rtnorm Sampling truncated univ normal distribution. This repos contains python and matlab package for simulation of truncated normal random variables based upon the codes: [Vincent Mazet](http://miv.u-strasbg.fr/mazet/rtnorm/), and it built from the article [Fast simulation of trunacted Gaussian distributions](http://link.springer.com/article/10.1007%2Fs11222-009-9168-1) of [Niclos Chopin](https://sites.google.com/site/nicolaschopinstatistician/software). ## Python For python the requirements are: * scipy (will be removed) * NumPy * Cython * openmp (option can be turned off in setupy.py) pip -e 'git+https://git@github.com/JonasWallin/rtnorm.git#egg=rtnorm&subdirectory=python/rtnorm' To use the sampler: import rtnorm sampler = rtnorm.rtnorm() X = sampler(a = 1, b = 2, mu = 3, sigma = 4) Or with vectors: import rtnorm import numpy as np X = sampler( a = np.zeros((4,)), b = np.random.rand(4) ) ## Matlab For matlab: make should install the make mex files link to the directory with addpath. Run matlab code with: x = rtnorm(a, b, mu, sigma); where a,b,mu, and sigma are vectors ###TODO: 1. setup test case in python (done) 2. setup speed test in python (done) 3. modify the code so it sutiable for vector versions (done) 4. Write the probability so we can test more advanced 5. Matlab version (done) 7. test on the amzaon cluster (done)
评论
    相关推荐
    • introduction-to-git:https
      谨慎使用 Git 丸山新平 介绍 本文档旨在以通俗易懂的方式解释 Git 的基本概念和用法。通过阅读本书 易于使用的 Git 你可以使用一个分支 多人可以一起工作 如果你有任何问题,你可以用谷歌找出“我应该查什么词” ...
    • git 教材 progit
      git资源,不错的git入门教程.适合初学者使用
    • git-kurs:na podstawie https
      git-kurs:na podstawie https
    • TVDbLib:httpsGit 克隆
      电视数据库 Git 克隆
    • git-mdp:mdp (https
      git-mdp 用于介绍 git 的甲板
    • Git环境搭建
      NULL 博文链接:https://fangguanhong.iteye.com/blog/2193321
    • Git学习笔记
      NULL 博文链接:https://shadowred.iteye.com/blog/2275226
    • git GUI使用
      NULL 博文链接:https://weiliuhong1.iteye.com/blog/2033484
    • git学习
      NULL 博文链接:https://yinmaolin1.iteye.com/blog/2198059
    • Git 中文教程
      NULL 博文链接:https://lfcaolibin.iteye.com/blog/1111704