Skip to content

Commit

Permalink
[doc] Update install instructions
Browse files Browse the repository at this point in the history
+ Minor doc fix in model.py
  • Loading branch information
treszkai committed Sep 19, 2019
1 parent a642f22 commit c7a1bf4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The [documentation](https://best.readthedocs.io) describes the API in detail.

## Installation ##

Ensure your Python version is sufficiently up-to-date:
Ensure your Python version is sufficiently up-to-date (at least 3.5.4):

```bash
$ python --version
Expand All @@ -51,7 +51,7 @@ Python 3.5.6

Then install with Pip:
```bash
$ pip install https://github.com/treszkai/best/archive/master.tar.gz
$ pip install best
```

## Developer notes ##
Expand Down
26 changes: 15 additions & 11 deletions best/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def model(self) -> pm.Model:
pass

@abstractmethod
def observed_data(self, group_id):
def observed_data(self, group_id: int):
"""Return the observed data as a NumPy array
(This property is accessible primarily for internal purposes.)
(This method is accessible primarily for internal purposes.)
"""
pass

Expand Down Expand Up @@ -123,7 +123,7 @@ def version(self):
def model(self):
return self._model

def observed_data(self, group_id):
def observed_data(self, group_id: int):
if group_id == 1:
return self.y
else:
Expand Down Expand Up @@ -200,7 +200,7 @@ def version(self):
def model(self):
return self._model

def observed_data(self, group_id):
def observed_data(self, group_id: int):
if group_id == 1:
return self.y1
elif group_id == 2:
Expand Down Expand Up @@ -241,28 +241,32 @@ def trace(self) -> MultiTrace:
"""
return self._trace

def observed_data(self, group_id):
def observed_data(self, group_id: int):
"""Return the observed data as a NumPy array
(This method is accessible primarily for internal purposes.)
"""
return self.model.observed_data(group_id)

def summary(self, alpha=None, credible_mass: float = 0.95):
"""Return summary statistics of the results
Parameters
----------
credible_mass : float
The highest posterior density intervals in the summary will cover
credible_mass * 100% of the probability mass.
For example, credible_mass=0.95 results in 95% credible intervals.
Default: 0.95.
alpha : float, optional
Deprecated argument to specify the width of the HDIs.
``alpha=0.05`` is equivalent to ``credible_mass=0.95``.
If specified, the ``credible_mass`` argument is ignored.
Default: ``None``, use the credible_mass argument.)
Default: ``None``, use the ``credible_mass`` argument instead.)
*Deprecated since version 2.1.0:*
Use of this argument is deprecated since version 2.1.0,
and will be removed in version 3.0.0.
credible_mass : float
The highest posterior density intervals in the summary will cover
credible_mass * 100% of the probability mass.
For example, credible_mass=0.95 results in 95% credible intervals.
Default: 0.95.
"""

return pm.summary(self.trace, alpha=alpha or (1 - credible_mass))
Expand Down
6 changes: 4 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ and can be installed with *pip*:

.. code-block:: bash
pip install https://github.com/treszkai/best/archive/master.zip
pip install best
This command installs the following dependencies:

Expand All @@ -89,10 +89,12 @@ This command installs the following dependencies:
Get in touch
------------

If you have trouble installing or using `best`, or understanding the results, or you found an error,
If you find the documentation lacking or you have found an error,
please `open an issue <https://github.com/treszkai/best/issues>`_ at the project's GitHub page,
or open a `pull request <https://github.com/treszkai/best/pulls>`_ if you have a proposed solution.

Your feedback and contribution is welcome!

Further documentation
---------------------

Expand Down
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
from setuptools import setup


with open("README.md", "r") as fh:
with open('README.md', 'r') as fh:
long_description = fh.read()

setup(name='best',
description='Bayesian estimation supersedes the t-test',
author='Andrew Straw and Laszlo Treszkai',
author_email='laszlo.treszkai@gmail.com',
long_description=long_description,
long_description_content_type="text/markdown",
long_description_content_type='text/markdown',
url='https://github.com/treszkai/best',
version='2.1.0',
packages=['best'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
license='MIT',
)
python_requires='>=3.5',
)

0 comments on commit c7a1bf4

Please sign in to comment.