Skip to content

Commit

Permalink
bumping to version 0.3.0
Browse files Browse the repository at this point in the history
Summary:
Updated CHANGELOG, init, and some misc fixes to setup.py and README.

This version fixes #19.

Props to tomwagstaff-opml for flagging the need for supporting Python 3.11.

Reviewed By: SarigT

Differential Revision: D42850883

fbshipit-source-id: f4822baafd11938981ba6b3a12258d3e5e7e478c
  • Loading branch information
talgalili authored and facebook-github-bot committed Jan 31, 2023
1 parent c25e241 commit faa0f4d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[Unreleased]
0.3.0 (2023-01-30)
==================
### New Features
- Added compatibility for SciPy 1.9.2 and Python 3.11
- Added compatibility for Python 3.11 (by supporting SciPy 1.9.2) (props to @tomwagstaff-opml for flagging this issue).
- Added the `session-info` package as a dependency.

### Bug Fixes
- Fixed pip install from source on Windows machines
- Fixed pip install from source on Windows machines (props to @tomwagstaff-opml for the bug report).

### Documentation
- Added `session_info.show()` outputs to the end of the three tutorials (at: https://import-balance.org/docs/tutorials/)
- Misc updates to the README.


0.2.0 (2023-01-19)
==================
Expand Down Expand Up @@ -43,6 +49,7 @@
- Added automated Github Action package builds & deployment to PyPi on release.
- See [release.yml](https://github.com/facebookresearch/balance/blob/main/.github/workflows/release.yml)


0.1.0 (2022-11-20)
==================
### Summary
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ Biased samples often occur in [survey statistics](https://en.wikipedia.org/wiki/

Under the missing at random assumption ([MAR](https://en.wikipedia.org/wiki/Missing_data#Missing_at_random)), bias in samples could sometimes be (at least partially) mitigated by relying on auxiliary information (a.k.a.: “covariates” or “features”) that is present for all items in the sample, as well as present in a sample of items from the population. For example, if we want to infer from a sample of respondents to some survey, we may wish to adjust for non-response using demographic information such as age, gender, education, etc. This can be done by weighing the sample to the population using auxiliary information.

The package is intended for researchers who are interested in balancing biased samples, such as the ones coming from surveys, using a Python package. This need may arise by survey methodologists, demographers, UX researchers, market researchers, and generally data scientists, statisticiains, and machine learners.
The package is intended for researchers who are interested in balancing biased samples, such as the ones coming from surveys, using a Python package. This need may arise by survey methodologists, demographers, UX researchers, market researchers, and generally data scientists, statisticians, and machine learners.


# Installation

## Requirements
You need Python 3.8 or later to run *balance*. *balance* can be built and run
from OSX, Linux, and Windows
You need Python 3.8 or later to run *balance*. *balance* can be built and run from Linux, OSX, and Windows (NOTE: `method="ipw"` is currently not supported on Windows).

The required Python dependencies are:
```python
Expand Down Expand Up @@ -131,7 +130,7 @@ adjusted = sample_with_target.adjust(max_de=None)

*You can read more on adjustment process in the [Adjusting Sample to Population](https://import-balance.org/docs/docs/general_framework/adjusting_sample_to_population/) page.*

The above code gets us an `adjusted` object with weights. We can evaluate the benefit of the weights to the coveriate balance, for example by running:
The above code gets us an `adjusted` object with weights. We can evaluate the benefit of the weights to the covariate balance, for example by running:

```python
print(adjusted.summary())
Expand Down Expand Up @@ -169,7 +168,7 @@ adjusted.outcomes().plot()
*You can read more on evaluation of the post-adjusted data in the [Evaluating and using the adjustment weights](https://import-balance.org/docs/docs/general_framework/evaluation_of_results/) page.*


Finally, the adjusted data can be downloded using:
Finally, the adjusted data can be downloaded using:
```python
adjusted.to_download() # Or:
# adjusted.to_csv()
Expand Down
2 changes: 1 addition & 1 deletion balance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# TODO: verify this works.

global __version__
__version__ = "0.2.0" # open source version
__version__ = "0.3.0" # open source version


def setup_logging(
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
Core library deps
Version requirements
* scipy<=1.8.1: Required by glmnet-python
* scipy<=1.9.2: Required by glmnet-python
* pandas<=1.4.3: 1.5.0 moved UndefinedVariableError into pandas.errors
Other requirements:
* [email protected], from https://github.com/bbalasub1/glmnet_python.git@1.0
* [email protected], from https://github.com/bbalasub1/glmnet_python.git
"""
REQUIRES = [
Expand Down Expand Up @@ -81,6 +81,8 @@ def setup_package() -> None:
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
],
)
Expand Down

0 comments on commit faa0f4d

Please sign in to comment.