Specification Curve is a Python package that performs specification curve analysis.
Project description
Specification Curve
Specification Curve is a Python package that performs specification curve analysis.
Free software: MIT license
Documentation: https://specification-curve.readthedocs.io.
Quickstart
from specification_curve import specification_curve as sc
import numpy as np
n_samples = 100
x_1 = np.random.random(size=n_samples)
x_2 = np.random.random(size=n_samples)
x_3 = np.random.random(size=n_samples)
x_4 = np.random.randint(2, size=n_samples)
y = (0.8*x_1 + 0.1*x_2 + 0.5*x_3 + x_4*0.6 +
+ 2*np.random.randn(n_samples))
df = pd.DataFrame([x_1, x_2, x_3, x_4, y],
['x_1', 'x_2', 'x_3', 'x_4', 'y']).T
y_endog = 'y'
x_exog = 'x_1'
controls = ['x_2', 'x_3', 'x_4']
# Set x_4 as a categorical variable
df['x_4'] = df['x_4'].astype('category')
df_r = sc.spec_curve(df, y_endog, x_exog, controls,
cat_expand=['x_4'])
Features
TODO
Similar Packages
In RStats, there is specr (which inspired many design choices in this package) and spec_chart. Some of the example data in this package is the same as in specr.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-07-27)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file specification_curve-0.1.0.tar.gz
.
File metadata
- Download URL: specification_curve-0.1.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bd936c2f0ec06d6d571f583b69c9b3d188dbf1064777712f76a2def7e59421b |
|
MD5 | 9280280db67249dbd6ef5aeb3753d8f2 |
|
BLAKE2b-256 | 0823938b3335688975731265dfd8e822589737e58120faedc5613c7584f5531b |
File details
Details for the file specification_curve-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: specification_curve-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f486bc93c3a22dc5f50975d626860f15f23d77ca8a732adfec487f153527c4d |
|
MD5 | 418bded12530d2ae325a360499382d92 |
|
BLAKE2b-256 | 493e947b51a95cd449e374c20adefc26283bf93607892014a94407f2effc74c1 |