Skip to content

Commit e5a2cda

Browse files
committed
v1.2.4
1 parent fe7e4c0 commit e5a2cda

File tree

3 files changed

+49
-25
lines changed

3 files changed

+49
-25
lines changed

MIDASpy.egg-info/PKG-INFO

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Metadata-Version: 2.1
22
Name: MIDASpy
3-
Version: 1.2.3
3+
Version: 1.2.4
44
Summary: Multiple Imputation with Denoising Autoencoders
55
Home-page: http://github.com/MIDASverse/MIDASpy
6-
Download-URL: https://github.com/MIDASverse/MIDASpy/archive/v1.2.3.tar.gz
6+
Download-URL: https://github.com/MIDASverse/MIDASpy/archive/v1.2.4.tar.gz
77
Author: Ranjit Lall, Alex Stenlake, and Thomas Robinson
88
Author-email: [email protected]
99
License: Apache
@@ -13,15 +13,26 @@ Classifier: Intended Audience :: Science/Research
1313
Classifier: Topic :: Scientific/Engineering
1414
Classifier: License :: OSI Approved :: Apache Software License
1515
Classifier: Programming Language :: Python :: 3
16-
Classifier: Programming Language :: Python :: 3.5
1716
Classifier: Programming Language :: Python :: 3.6
1817
Classifier: Programming Language :: Python :: 3.7
18+
Classifier: Programming Language :: Python :: 3.8
19+
Classifier: Programming Language :: Python :: 3.9
20+
Classifier: Programming Language :: Python :: 3.10
21+
Requires-Python: >=3.6, <3.11
1922
Description-Content-Type: text/markdown
23+
Provides-Extra: test
2024
License-File: LICENSE.txt
2125

2226

2327
# MIDASpy<img src='MIDASpy_logo.png' align="right" height="139" /></a>
2428

29+
[![PyPI Latest Release](https://img.shields.io/pypi/v/midaspy.svg)](https://pypi.org/project/midaspy/)
30+
[![Python Version](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue)](https://pypi.org/project/midaspy/)
31+
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
32+
[![CI Linux](https://github.com/edvinskis/MIDASpy/actions/workflows/testlinux.yml/badge.svg)](https://github.com/edvinskis/MIDASpy/actions/workflows/testlinux.yml)
33+
[![CI macOS](https://github.com/edvinskis/MIDASpy/actions/workflows/testmacos.yml/badge.svg)](https://github.com/edvinskis/MIDASpy/actions/workflows/testmacos.yml)
34+
[![CI Windows](https://github.com/edvinskis/MIDASpy/actions/workflows/testwindows.yml/badge.svg)](https://github.com/edvinskis/MIDASpy/actions/workflows/testwindows.yml)
35+
2536
## Overview
2637

2738
**MIDASpy** is a Python package for multiply imputing missing data using
@@ -36,46 +47,53 @@ and estimating regression models on these datasets.
3647
For an implementation in R, see our **rMIDAS** repository
3748
[here](https://github.com/MIDASverse/rMIDAS).
3849

39-
## Background and suggested citation
50+
## Background and suggested citations
4051

4152
For more information on MIDAS, the method underlying the software, see:
4253

43-
Lall, Ranjit, and Thomas Robinson. 2022. "The MIDAS Touch: Accurate and Scalable Missing-Data Imputation with Deep Learning." _Political Analysis_ 30, no. 2: 179-196. https://doi.org/10.1017/pan.2020.49.
54+
Lall, Ranjit, and Thomas Robinson. 2022. "The MIDAS Touch: Accurate and Scalable Missing-Data Imputation with Deep Learning." _Political Analysis_ 30, no. 2: 179-196. [Published version](https://ranjitlall.github.io/assets/pdf/Lall%20and%20Robinson%202022%20PA.pdf). [Accepted version](http://eprints.lse.ac.uk/108170/1/Lall_Robinson_PA_Forthcoming.pdf).
4455

45-
An ungated version of the paper is available [here](http://eprints.lse.ac.uk/108170/1/Lall_Robinson_PA_Forthcoming.pdf).
56+
Lall, Ranjit, and Thomas Robinson. 2023. "Efficient Multiple Imputation for Diverse Data in Python and R: MIDASpy and rMIDAS." _Journal of Statistical Software_. [Accepted version](https://ranjitlall.github.io/assets/pdf/jss4379.pdf) (in press).
4657

4758
## Installation
4859

4960
To install via pip, enter the following command into the terminal:
5061
`pip install MIDASpy`
5162

5263
The latest development version (potentially unstable) can be installed
53-
via the terminal with: `pip install
54-
git+https://github.com/MIDASverse/MIDASpy.git`
64+
via the terminal with:
65+
`pip install git+https://github.com/MIDASverse/MIDASpy.git`
5566

5667
MIDAS requires:
5768

58-
- Python (\>=3.5; \<3.9)
59-
- Numpy (\>=1.5)
60-
- Pandas (\>=0.19)
61-
- Tensorflow (\>= 1.10) – **TensorFlow\>=2.2 now fully supported**
69+
- Python (>=3.6; <3.11)
70+
- Numpy (>=1.5)
71+
- Pandas (>=0.19)
72+
- TensorFlow (<2.12)
6273
- Matplotlib
6374
- Statmodels
6475
- Scipy
65-
- TensorFlow Addons (\>=0.11 if using Tensorflow \>= 2.2)
76+
- TensorFlow Addons (<0.20)
6677

67-
Tensorflow also has a number of requirements, particularly if GPU
68-
acceleration is desired. See <https://www.tensorflow.org/install/> for
69-
details.
78+
Tensorflow also has a number of requirements, particularly if GPU acceleration is desired. See <https://www.tensorflow.org/install/> for details.
7079

71-
## Example
80+
## Examples
7281

7382
For a simple demonstration of **MIDASpy**, see our Jupyter Notebook
74-
[example](https://github.com/MIDASverse/MIDASpy/blob/master/Examples/midas_demo.ipynb).
83+
[examples](https://github.com/MIDASverse/MIDASpy/blob/master/Examples/).
7584

7685
## Contributing to MIDASpy
7786

78-
Interested in contributing to **MIDASpy**? We are looking to hire a research assistant to work part-time (flexibly) to help us build out new features and integrate our software with existing machine learning pipelines. You would be paid the standard research assistant rate at the London School of Economics. To apply, please send your CV (or a summary of relevant skills/experience) to [email protected].
87+
Interested in contributing to **MIDASpy**? We are looking to hire a research assistant to work part-time (flexibly) to help us build out new features and integrate our software with existing machine learning pipelines. You would be paid the standard research assistant rate at the University of Oxford. To apply, please send your CV (or a summary of relevant skills/experience) to [email protected].
88+
89+
## Version 1.2.4 (August 2023)
90+
91+
*v1.2.4*
92+
- Adds support for Python 3.9 and 3.10
93+
- Addresses deprecation warnings and other minor bug fixes
94+
- Resolves dependency issues and includes an updated `setup.py` file
95+
- Adds GitHub Actions workflows that trigger automatic tests on the latest Ubuntu, macOS, and Windows for Python versions 3.7 to 3.10 each time a push or pull request is made to the main branch
96+
- An additional Jupyter Notebook example that demonstrates the core functionalities of **MIDASpy**
7997

8098
## Version 1.2.3 (December 2022)
8199

MIDASpy.egg-info/requires.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ numpy>=1.5
22
scikit-learn
33
matplotlib
44
pandas>=0.19
5-
tensorflow_addons>=0.11
5+
tensorflow_addons<0.20
66
statsmodels
77
scipy
88

99
[:sys_platform != "darwin" or platform_machine != "arm64"]
10-
tensorflow>=1.10
10+
tensorflow<2.12.0
1111

1212
[:sys_platform == "darwin" and platform_machine == "arm64"]
13-
tensorflow-macos>=1.10
13+
tensorflow-macos<2.12.0
14+
15+
[test]
16+
pytest
17+
matplotlib

build/lib/MIDASpy/midas_base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ def _sort_cols(data,
311311
the order [Continuous data], [Binary data], [Categorical data]. It simply
312312
rearranges a column, done functionally to minimise memory overhead
313313
"""
314+
if not isinstance(subset, list):
315+
subset = list(subset)
314316
data_1 = data[subset]
315317
data_0 = data.drop(subset, axis=1)
316318
chunk = data_1.shape[1]
@@ -421,7 +423,7 @@ def build_model(self,
421423
# Commit some variables to the instance of the class
422424
self.size_index = size_index
423425
if not self.input_is_pipeline:
424-
self.na_matrix = imputation_target.notnull().astype(np.bool)
426+
self.na_matrix = imputation_target.notnull().astype(bool)
425427
self.imputation_target = imputation_target.fillna(0)
426428
if additional_data is not None:
427429
self.additional_data = additional_data.fillna(0)
@@ -1836,7 +1838,7 @@ def change_imputation_target(self, new_target, additional_data=None):
18361838
if self.additional_data is not None:
18371839
self.additional_data = additional_data.copy()
18381840
self.additional_data.fillna(0, inplace=True)
1839-
self.na_matrix = self.imputation_target.notnull().astype(np.bool)
1841+
self.na_matrix = self.imputation_target.notnull().astype(bool)
18401842
self.imputation_target.fillna(0, inplace=True)
18411843
return self
18421844

@@ -1990,7 +1992,7 @@ def cat_conv(cat_data):
19901992

19911993
for column in cat_data.columns:
19921994
na_temp = cat_data[column].isnull()
1993-
temp = pd.get_dummies(cat_data[column], prefix=column)
1995+
temp = pd.get_dummies(cat_data[column], prefix=column, dtype=np.uint8)
19941996
temp[na_temp] = np.nan
19951997
cat_construct.append(temp)
19961998
cat_col_names.append(list(temp.columns.values))

0 commit comments

Comments
 (0)