Skip to content

Commit d217fe9

Browse files
author
Lucas Einig
committed
Docs
1 parent 63feb59 commit d217fe9

33 files changed

+1847
-687
lines changed

.github/workflows/publish.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish package to PyPI when a new version tag is pushed
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
pypi-publish:
10+
name: Publish release to PyPI
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/astro-ranch>
15+
permissions:
16+
id-token: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.x"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -q build
27+
- name: Build package
28+
run: |
29+
python -m build
30+
- name: Publish package distributions to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# InfoVar
22

33
[![PyPI version](https://badge.fury.io/py/infovar.svg)](https://badge.fury.io/py/infovar)
4-
[![Documentation Status](https://readthedocs.org/projects/infovar/badge/?version=latest)](https://infovar.readthedocs.io/en/latest/?badge=latest)
5-
![test coverage](./coverage.svg)
4+
[![Documentation status](https://readthedocs.org/projects/infovar/badge/?version=latest)](https://infovar.readthedocs.io/en/latest/?badge=latest)
5+
![](./coverage.svg)
66

77
The `infovar` Python package provides tools to efficiently study the informativity of variables on data of interest.
88

coverage.svg

+2-2
Loading

docs/coverage.svg

-21
This file was deleted.

docs/gallery-examples.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ Gallery of examples
33

44
This gallery contains several application examples for the ``infovar`` package to illustrate diverse features.
55

6-
76
**Discrete and continuous handler basic use:**
87

9-
- ``discrete-handler.ipynb``: illustrate the basic features of `DiscreteHandler` on synthetic data
10-
- ``continuous-handler.ipynb``: illustrate the basic features of `ContinuousHandler` on synthetic data
8+
- ``discrete-handler.ipynb``: illustrates the basic features of ``DiscreteHandler`` on synthetic data
9+
- ``continuous-handler.ipynb``: illustrates the basic features of ``ContinuousHandler`` on synthetic data
1110

1211
**California Housing real-world example:**
1312

docs/index.rst

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
.. InfoVar documentation master file, created by
2-
sphinx-quickstart on Thu Sep 19 09:37:55 2024.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
61
Welcome to InfoVar's documentation
72
==================================
83

9-
The `infovar` Python package provides tools to efficiently study the informativity of variables on data of interest.
4+
The ``infovar`` Python package provides tools to efficiently study the informativity of variables on data of interest.
105

116

127
Context
138
=======
149

1510
The informativity of a variable or set of variables is defined here as the ability of these variables, if known, to reduce the uncertainty we have about a quantity of interest. This uncertainty can be defined in several ways, for example in the sense of Shannon's information theory.
1611

17-
This is a ubiquitous problem in science in general, with very concrete applications in climatology, economics, psychology, sociology, and astrophysics, to name a few. Consequently, `InfoVar` has been designed to be very general.
12+
This is a ubiquitous problem in science in general, with very concrete applications in climatology, economics, psychology, sociology, and astrophysics, to name a few. Consequently, *InfoVar* has been designed to be very general.
1813

1914
This package provides tools for quantifying the statistical dependence (e.g., mutual information, but other metrics are available) between continuous numerical data and estimating the associated error as well as the influence of the latter on the order of variables in terms of importance.
2015

@@ -84,7 +79,7 @@ Statistics
8479

8580
In this project, we propose to measure the statistical dependence of variables based on the mutual information. Other metrics can also be used, such as the conditional differential entropy, which is closely related to mutual information, or canonical correlation coefficient.
8681

87-
Mutual information and conditional differential entropy are estimated nonparametrically using [Greg Ver Steeg's implementation](http://www.isi.edu/~gregv/npeet.html). More details are given in the `assessment` directory, which evaluates the properties of each available statistics and provides further mathematical context and references.
82+
Mutual information and conditional differential entropy are estimated nonparametrically using [Greg Ver Steeg's implementation](http://www.isi.edu/~gregv/npeet.html). More details are given in the ``assessment`` directory, which evaluates the properties of each available statistics and provides further mathematical context and references.
8883

8984
If you're interested in other metrics, it's possible to add and use them.
9085

@@ -100,9 +95,9 @@ To account for these uncertainties and to be able to compare different values pr
10095
Estimation for different range of values
10196
----------------------------------------
10297

103-
The heart of `InfoVar` lies in the fact that the informativity of a variable on a quantity of interest can vary according to the selected range of value of this quantity.
98+
The heart of *InfoVar* lies in the fact that the informativity of a variable on a quantity of interest can vary according to the selected range of value of this quantity.
10499

105-
For example, if we're interested in house prices in California (see `examples/california-housing`), among a set of variables, geographical location (latitude, longitude) appears to be the most important pair of variables. However, if we restrict ourselves to the 10% most expensive homes, it appears that the number of rooms in the house becomes most useful. This type of observation is important, for example, from a data analysis point of view, but also in a variable selection context.
100+
For example, if we're interested in house prices in California (see ``examples/california-housing``), among a set of variables, geographical location (latitude, longitude) appears to be the most important pair of variables. However, if we restrict ourselves to the 10% most expensive homes, it appears that the number of rooms in the house becomes most useful. This type of observation is important, for example, from a data analysis point of view, but also in a variable selection context.
106101

107102
More generally, taking into account these variations as a function of ranges of values of the variable of interest enables more refined analysis of phenomena. To help you understand, here are a few examples of possible applications.
108103

@@ -130,20 +125,20 @@ It is also possible to perform the same analysis, but according to the value ran
130125
- *Data of interest:* number of medals won by each country in each of the last 10 editions of the games.
131126
- *Variables:* amount invested by the national Olympic committee, population, per capita income, unemployment rate.
132127

133-
The `InfoVar` allows you to perform sensitivity analysis in two ways:
128+
*InfoVar* allows you to perform sensitivity analysis in two ways:
134129
1. Define rigid intervals for the data that varies (example: houses priced below $150k, between $150 and $350k and above $350k).
135130
2. Define a sliding window and calculate the evolution of the statistics almost continuously.
136131

137-
In case 1 (discrete case), the `DiscreteHandler` class provides all the important functions for calculating, storing and accessing results. In case 2 (continuous case), the `ContinuousHandler` class is used. The notebooks in `examples` give an example of the use of each of these two classes.
132+
In case 1 (discrete case), the ``DiscreteHandler`` class provides all the important functions for calculating, storing and accessing results. In case 2 (continuous case), the ``ContinuousHandler`` class is used. The notebooks in ``examples`` give an example of the use of each of these two classes.
138133

139134

140135
References
141136
==========
142137

143138
[1] Einig, L & Palud, P. & Roueff, A. & Pety, J. & Bron, E. & Le Petit, F. & Gerin, M. & Chanussot, J. & Chainais, P. & Thouvenin, P.-A. & Languignon, D. & Bešlić, I. & Coudé, S. & Mazurek, H. & Orkisz, J. H. & G. Santa-Maria, M. & Ségal, L. & Zakardjian, A. & Bardeau, S. & Demyk, K. & de Souza Magalhẽs, V. & Javier R. Goicoechea & Gratier, P. & V. Guzmán, V. & Hughes, A. & Levrier, F. & Le Bourlot, J. & Darek C. Lis & Liszt, H. S. & Peretto, N. & Roueff, E & Sievers, A. (2024).
144139
**Quantifying the informativity of emission lines to infer physical conditions in giant molecular clouds. I. Application to model predictions.** *Astronomy & Astrophysics.*
145-
10.xxxx/xxxx-xxxx/xxxxxxxxx.
140+
`10.1051/0004-6361/202451588_ <https://doi.org/10.1051/0004-6361/202451588>`.
146141

147-
[2] Einig, L et al (2024, in prep.).
142+
[2] Einig, L et al (in prep.).
148143
**Quantifying the informativity of emission lines to infer physical conditions in giant molecular clouds. II. Training robust models from selected observations.** *Astronomy & Astrophysics.*
149-
10.xxxx/xxxx-xxxx/xxxxxxxxx.
144+
`10.xxxx/xxxx-xxxx/xxxxxxxxx_ <todo.com>`.

docs/infovar.rst

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Subpackages
88
:maxdepth: 4
99

1010
infovar.handlers
11+
infovar.processing
1112
infovar.stats
1213

1314
Module contents

examples/.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# California housing inputs and outputs
1+
# Handlers introduction outputs
2+
handlers/data
3+
4+
# California housing outputs
25
california-housing/data-out
36
california-housing/data-out-continuous
47

examples/README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# Example Jupyter notebooks
22

3-
This directory contains example notebooks illustrating the use of the `InfoVar` package for two different use cases.
3+
This directory contains example notebooks illustrating the use of the *InfoVar* package for two different use cases.
44

5-
- `california-housing.ipynb`: seeks the most useful variables or set of variables to estimate accurately the price of houses in California.
6-
- `multivariate-functions.ipynb`: seeks the most informative subset of variables in real multivariate analytic functions.
5+
**Discrete and continuous handler basic use:**
6+
7+
- ``discrete-handler.ipynb``: illustrate the basic features of `DiscreteHandler` on synthetic data
8+
- ``continuous-handler.ipynb``: illustrate the basic features of `ContinuousHandler` on synthetic data
9+
10+
**California Housing real-world example:**
11+
12+
- ``californa-housing.ipynb``: most informative feature to predict house values in California
13+
14+
**Statistical details:**
15+
16+
- ``stat:bias-variance.ipynb``: controlling the bias and estimating the variance of canonical correlations and mutual information estimators
17+
- ``stat:canonical-corr.ipynb``: canonical correlations and their relation to mutual information in detail
18+
- ``stat:degeneracy.ipynb``: influence of duplicate data on estimators of differential conditional entropy and mutual information
19+
- ``stat:distribution.ipynb``: influence of data distribution on conditional differential entropy, mutual information and canonical correlations
20+
- ``stat:multidim.ipynb``: behavior and interpretation of mutual information for multidimensional variables or targets
21+
- ``stat:ranking``: variable ranking in details

examples/california-housing.ipynb

+95-106
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)