semvec/pypi-packages huggingface dataset:
pycausal-explorer 0.2.0
Python causal inference modules

[![codecov](https://codecov.io/gh/gotolino/pycausal-explorer/branch/main/graph/badge.svg?token=5W6KVR73GJ)](https://codecov.io/gh/gotolino/pycausal-explorer)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# Pycausal-explorer #

Pycausal-explorer is a python module for causal inference and treatment effect estimation. It implements a set of 
algorithms that supports causal analysis.

## Installation Guide ##

You can install the package through pip:

``pip install pycausal-explorer``

## Basic Usage ##
All models are inherited from BaseCausalModel, that inherits from scikit-learn BaseEstimator. 
It uses scikit-learn framework to fit and predict the outcome. It implements predict_ite and predict_ate
methods that return the individual treatment effect and the average treatment effect, respectively.
```
from pycausal_explorer.datasets.synthetic import create_synthetic_data
from pycausal_explorer.meta import XLearner

x, treatment, y = create_synthetic_data()
model = XLearner()
model.fit(x, treatment, y)
treatment_effect = model.predict_ite(x)
```

## Current Implemented Models ##
This version currently implements propensity score and iptw in the reweight package, linear regression in the linear package, causal forests in forest package and x-learn in meta package. 

## Using Pipelines ##

Pycausal-explorer has a Pipeline class inherited from scikit-learn Pipeline. 
It implements the method predict_ite, so it can be used pro predict treatment effect in a pipeline:
```
from sklearn.preprocessing import StandardScaler

from pycausal_explorer.datasets.synthetic import create_synthetic_data
from pycausal_explorer.pipeline import Pipeline
from pycausal_explorer.reweight import IPTW

x, w, y = create_synthetic_data()
pipe = Pipeline([("norm", StandardScaler()), ("clf", IPTW())])
pipe.fit(x, y, clf__treatment=w)
treatment_effect = pipe.predict_ite(x)
```
subsalt 0.2.2
Convenience wrapper for accessing Subsalt datastore
Requires Python: >=3.6

[Subsalt](https://getsubsalt.com) is a synthetic datastore that makes sensitive datasets shareable. This library provides an interface for retrieving data from Subsalt tables for use in other applications.

## Installation

```
pip install subsalt
```

## Usage

This library is a thin convenience wrapper around [psycopg2](https://pypi.org/project/psycopg2). psycopg2 or similar connectors can also be used directly if more flexibility is required.

**Note:** this library is currently in beta, and the interface may change significantly over time.

Retrieving data from Subsalt requires valid credentials. For access, contact the data owner or email `hello@getsubsalt.com`.

### Authentication

```python
client = subsalt.Client(
    username=os.getenv('SUBSALT_USERNAME'),
    password=os.getenv('SUBSALT_PASSWORD'),
)

# `client` can retrieve data on your behalf
```

### Retrieving data

```python
client = subsalt.Client(
    username=os.getenv('SUBSALT_USERNAME'),
    password=os.getenv('SUBSALT_PASSWORD'),
)

# Optional - get a list of tables you can access
for table in client.tables():
    print('{}.{}'.format(table.schema, table.table)

# Retrieve data via SQL
df = client.sql('select * from my_schema.my_table limit 250')
```
pynova 0.0.4
An easy Python alternative to R functions relating to ANOVA
Requires Python: >=3.6

# PyNOVA
As an ANOVA professor's research assistant at Brigham Young University, I was tasked with converting sample R code designed for class instruction to Python. I was surprised with the lack of options in Python to perform tasks such as calculating power for more than two groups. This package provides easy Python function equivalents to some of the more complex R functions relating to analysis surrounding ANOVA and power.