Skip to content

Commit

Permalink
Merge branch 'main' into achille/prepare_release
Browse files Browse the repository at this point in the history
  • Loading branch information
velezbeltran committed Jun 11, 2024
2 parents a92b11b + 7fced47 commit 488b472
Show file tree
Hide file tree
Showing 42 changed files with 38 additions and 2,379 deletions.
20 changes: 0 additions & 20 deletions .editorconfig

This file was deleted.

14 changes: 0 additions & 14 deletions .readthedocs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Changelog
=========

0.0.0 (2024-02-12)
0.0.0 (2024-06-11)
------------------

* First release on PyPI.
72 changes: 36 additions & 36 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
========
Overview
========
====================
Treeffuser
====================

Diffusion but trees
Treeffuser is an easy-to-use package for probabilistic prediction on tabular data with tree-based diffusion models.
Its goal is to estimate distributions of the form `p(y|x)` where `x` is a feature vector, `y` is a target vector
and the form of `p(y|x)` can be arbitrarily complex (e.g multimodal, heteroskedastic, non-gaussian, heavy-tailed, etc).

* Free software: MIT license
It is designed to adhere closely to the scikit-learn API and requires minimal user tuning.

Installation
============

::

pip install treeffuser

You can also install the in-development version with::
Usage Example
-------------

pip install git+ssh://git@https://github.com/blei-lab/tree-diffuser/blei-lab/treeffuser.git@main
Here's how you can use Treeffuser in your project:

Documentation
=============
.. code-block:: python
from treeffuser import LightGBMTreeffuser
import numpy as np
https://treeffuser.readthedocs.io/
# (n_training, n_features), (n_training, n_targets)
X, y = ... # load your data
# (n_test, n_features)
X_test = ... # load your test data
# Estimate p(y|x) with a tree-based diffusion model
model = LightGBMTreeffuser()
model.fit(X, y)
Development
===========
# Draw samples y ~ p(y|x) for each test point
# (n_samples, n_test, n_targets)
y_samples = model.sample(X_test, n_samples=1000)
To run all the tests run::
# Compute downstream metrics
mean = np.mean(y_samples, axis=0)
std = np.std(y_samples, axis=0)
median = np.median(y_samples, axis=0)
quantile = np.quantile(y_samples, q=0 axis=0)
... # other metrics
tox
Please refer to the docstrings for more information on the available methods and parameters.

However, this is usually excessive so it is easier to use pytest with
your environment. When you push tox will run automatically.

Note, to combine the coverage data from all the tox environments run:

.. list-table::
:widths: 10 90
:stub-columns: 1
Installation
============

- - Windows
- ::
You can install Treeffuser via pip from PyPI with the following command::

set PYTEST_ADDOPTS=--cov-append
tox
pip install treeffuser

- - Other
- ::
You can also install the in-development version with::

PYTEST_ADDOPTS=--cov-append tox
pip install git+https://github.com/blei-lab/tree-diffuser.git@main
1 change: 0 additions & 1 deletion docs/authors.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog.rst

This file was deleted.

50 changes: 0 additions & 50 deletions docs/conf.py

This file was deleted.

1 change: 0 additions & 1 deletion docs/contributing.rst

This file was deleted.

21 changes: 0 additions & 21 deletions docs/index.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/installation.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/readme.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/reference/index.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/reference/treeffuser.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

11 changes: 0 additions & 11 deletions docs/spelling_wordlist.txt

This file was deleted.

7 changes: 0 additions & 7 deletions docs/usage.rst

This file was deleted.

309 changes: 0 additions & 309 deletions notebooks/debug.ipynb

This file was deleted.

148 changes: 0 additions & 148 deletions notebooks/diffusion_visualization.ipynb

This file was deleted.

Loading

0 comments on commit 488b472

Please sign in to comment.