-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'josesho-v0.2.1' into v0.2.1
- Loading branch information
Showing
15 changed files
with
181 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/python | ||
# -*-coding: utf-8 -*- | ||
# Author: Joses Ho | ||
# Email : [email protected] | ||
|
||
|
||
def load(data, idx, x=None, y=None, paired=False, id_col=None, | ||
ci=95, resamples=5000, random_seed=12345): | ||
''' | ||
Loads data in preparation for estimation statistics. | ||
This is designed to work with pandas DataFrames. | ||
Parameters | ||
---------- | ||
data : pandas DataFrame | ||
idx : tuple | ||
List of column names (if 'x' is not supplied) or of category names | ||
(if 'x' is supplied). This can be expressed as a tuple of tuples, | ||
with each individual tuple producing its own contrast plot | ||
x, y : strings, default None | ||
Column names for data to be plotted on the x-axis and y-axis. | ||
paired : boolean, default False. | ||
id_col : default None. | ||
Required if `paired` is True. | ||
ci : integer, default 95 | ||
The confidence interval width. The default of 95 produces 95% | ||
confidence intervals. | ||
resamples : integer, default 5000. | ||
The number of resamples taken to generate the bootstraps which are used | ||
to generate the confidence intervals. | ||
random_seed : int, default 12345 | ||
This integer is used to seed the random number generator during | ||
bootstrap resampling, ensuring that the confidence intervals | ||
reported are replicable. | ||
Returns | ||
------- | ||
A `Dabest` object. | ||
Example | ||
-------- | ||
Load libraries. | ||
>>> import numpy as np | ||
>>> import pandas as pd | ||
>>> import dabest | ||
Create dummy data for demonstration. | ||
>>> np.random.seed(88888) | ||
>>> N = 10 | ||
>>> c1 = sp.stats.norm.rvs(loc=100, scale=5, size=N) | ||
>>> t1 = sp.stats.norm.rvs(loc=115, scale=5, size=N) | ||
>>> df = pd.DataFrame({'Control 1' : c1, 'Test 1': t1}) | ||
Load the data. | ||
>>> my_data = dabest.load(df, idx=("Control 1", "Test 1")) | ||
''' | ||
from ._classes import Dabest | ||
|
||
return Dabest(data, idx, x, y, paired, id_col, ci, resamples, random_seed) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[pytest] | ||
filterwarnings = | ||
ignore::UserWarning | ||
ignore::DeprecationWarning | ||
ignore::DeprecationWarning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
# Testing | ||
|
||
|
||
We use [pytest](https://docs.pytest.org/en/latest) to execute the tests. More documentation of the testing paradigm will be added in the near future. | ||
|
||
To run the tests, go to the root of this repo directory and run | ||
|
||
```shell | ||
pytest dabest | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ def check_dependencies(): | |
author_email='[email protected]', | ||
maintainer='Joses W. Ho', | ||
maintainer_email='[email protected]', | ||
version='0.2.0', | ||
version='0.2.1', | ||
description=DESCRIPTION, | ||
long_description=LONG_DESCRIPTION, | ||
packages=find_packages(), | ||
|