flowgem 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ name: ci
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ ci:
7
+ # Set up operating system
8
+ runs-on: ubuntu-latest
9
+
10
+ # Define job steps
11
+ steps:
12
+ - name: Check-out repository
13
+ uses: actions/checkout@v3
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: "3.12"
19
+ cache: pip
20
+
21
+ - name: Upgrade pip
22
+ run: python -m pip install --upgrade pip
23
+
24
+ - name: Install CPU-only torch
25
+ run: pip install torch --index-url https://download.pytorch.org/whl/cpu
26
+
27
+ - name: Install package
28
+ run: pip install -e . --group dev --group docs
29
+
30
+ - name: Test with pytest
31
+ run: python -m pytest tests/ --cov=flowgem --cov-report=xml
32
+
33
+ - name: Use Codecov to track coverage
34
+ uses: codecov/codecov-action@v5
35
+ with:
36
+ token: ${{ secrets.CODECOV_TOKEN }}
37
+ files: ./coverage.xml # coverage report
38
+
39
+ - name: Build documentation
40
+ run: make html --directory docs/
@@ -0,0 +1,106 @@
1
+ name: Publish Python package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions: {}
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+
15
+ steps:
16
+ - name: Check out the release
17
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18
+ with:
19
+ persist-credentials: false
20
+ fetch-depth: 0
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
24
+ with:
25
+ python-version: "3.12"
26
+
27
+ - name: Build and check distributions
28
+ run: |
29
+ python -m pip install --upgrade build twine
30
+ rm -rf dist
31
+ python -m build
32
+ python -m twine check --strict dist/*
33
+
34
+ - name: Check that the release tag matches the package version
35
+ env:
36
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
37
+ run: |
38
+ python - <<'PY'
39
+ import os
40
+ from pathlib import Path
41
+ from zipfile import ZipFile
42
+ from email.parser import BytesParser
43
+
44
+ wheel, = Path("dist").glob("*.whl")
45
+ with ZipFile(wheel) as archive:
46
+ metadata_path, = (
47
+ name for name in archive.namelist()
48
+ if name.endswith(".dist-info/METADATA")
49
+ )
50
+ metadata = BytesParser().parsebytes(
51
+ archive.read(metadata_path)
52
+ )
53
+
54
+ expected_tag = f"v{metadata['Version']}"
55
+ if os.environ["RELEASE_TAG"] != expected_tag:
56
+ raise SystemExit(
57
+ f"Release tag must be {expected_tag!r}; "
58
+ f"got {os.environ['RELEASE_TAG']!r}"
59
+ )
60
+ PY
61
+
62
+ - name: Store the release files
63
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
64
+ with:
65
+ name: release-dists
66
+ path: dist/
67
+ if-no-files-found: error
68
+
69
+ publish-testpypi:
70
+ needs: build
71
+ runs-on: ubuntu-latest
72
+ environment: testpypi
73
+ permissions:
74
+ id-token: write
75
+
76
+ steps:
77
+ - name: Retrieve the release files
78
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
79
+ with:
80
+ name: release-dists
81
+ path: dist/
82
+
83
+ - name: Upload to TestPyPI
84
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
85
+ with:
86
+ repository-url: https://test.pypi.org/legacy/
87
+
88
+ publish-pypi:
89
+ needs: [build, publish-testpypi]
90
+ runs-on: ubuntu-latest
91
+
92
+ # Required reviewers MUST be configured for this environment.
93
+ environment: pypi
94
+
95
+ permissions:
96
+ id-token: write
97
+
98
+ steps:
99
+ - name: Retrieve the same release files
100
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
101
+ with:
102
+ name: release-dists
103
+ path: dist/
104
+
105
+ - name: Upload to PyPI
106
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
@@ -0,0 +1,142 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+ **__pycache__
131
+
132
+ # PyCharm
133
+ .idea/
134
+
135
+ # RStudio project files
136
+ **.Rproj.user/
137
+ **.Rproj.user*
138
+ **.Rproj
139
+ **.Rhistory
140
+
141
+ # MacOS
142
+ .DS_Store
@@ -0,0 +1,24 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.12"
13
+ jobs:
14
+ post_create_environment:
15
+ # Update pip to support dependency groups
16
+ - python -m pip install --upgrade pip
17
+ # CPU-only torch, so the build doesn't download the CUDA packages
18
+ - python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
19
+ post_install:
20
+ - python -m pip install -e . --group docs
21
+
22
+ # Build documentation in the "docs/" directory with Sphinx
23
+ sphinx:
24
+ configuration: docs/conf.py
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ <!--next-version-placeholder-->
4
+
5
+ ## v0.1.0 (09/07/2026)
6
+
7
+ - First release of `flowgem`!
@@ -0,0 +1,43 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant homepage](http://contributor-covenant.org/version/1/4), version 1.4.
@@ -0,0 +1,81 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit
4
+ helps, and credit will always be given.
5
+
6
+ ## Types of Contributions
7
+
8
+ ### Report Bugs
9
+
10
+ If you are reporting a bug, please include:
11
+
12
+ * Your operating system name and version.
13
+ * Any details about your local setup that might be helpful in troubleshooting.
14
+ * Detailed steps to reproduce the bug.
15
+
16
+ ### Fix Bugs
17
+
18
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
19
+ wanted" is open to whoever wants to implement it.
20
+
21
+ ### Implement Features
22
+
23
+ Look through the GitHub issues for features. Anything tagged with "enhancement"
24
+ and "help wanted" is open to whoever wants to implement it.
25
+
26
+ ### Write Documentation
27
+
28
+ You can never have enough documentation! Please feel free to contribute to any
29
+ part of the documentation, such as the official docs, docstrings, or even
30
+ on the web in blog posts, articles, and such.
31
+
32
+ ### Submit Feedback
33
+
34
+ If you are proposing a feature:
35
+
36
+ * Explain in detail how it would work.
37
+ * Keep the scope as narrow as possible, to make it easier to implement.
38
+ * Remember that this is a volunteer-driven project, and that contributions
39
+ are welcome :)
40
+
41
+ ## Get Started!
42
+
43
+ Ready to contribute? Here's how to set up `flowgem` for local development.
44
+
45
+ 1. Download a copy of `flowgem` locally.
46
+
47
+ 2. Create and activate a conda environment for `flowgem`:
48
+
49
+ ```console
50
+ $ conda create -n flowgem python=3.12
51
+ $ conda activate flowgem
52
+ ```
53
+
54
+ 3. Install `flowgem` using `poetry`:
55
+
56
+ ```console
57
+ $ poetry install
58
+ ```
59
+
60
+ 4. Use `git` (or similar) to create a branch for local development and make your changes:
61
+
62
+ ```console
63
+ $ git checkout -b name-of-your-bugfix-or-feature
64
+ ```
65
+
66
+ 5. When you're done making changes, check that your changes conform to any code formatting requirements and pass any tests.
67
+
68
+ 6. Commit your changes and open a pull request.
69
+
70
+ ## Pull Request Guidelines
71
+
72
+ Before you submit a pull request, check that it meets these guidelines:
73
+
74
+ 1. The pull request should include additional tests if appropriate.
75
+ 2. If the pull request adds functionality, the docs should be updated.
76
+ 3. The pull request should work for all currently supported operating systems and versions of Python.
77
+
78
+ ## Code of Conduct
79
+
80
+ Please note that the `flowgem` project is released with a
81
+ Code of Conduct. By contributing to this project you agree to abide by its terms.
flowgem-0.1.0/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026, Muhammad Haris Mumtaz, Gitte Kremling
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
flowgem-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.5
2
+ Name: flowgem
3
+ Version: 0.1.0
4
+ Summary: Nonparametric generative sampling for MAR missing data via approximate Wasserstein gradient flows
5
+ Project-URL: Homepage, https://github.com/gkremling/FLOWGEM-package
6
+ Project-URL: Repository, https://github.com/gkremling/FLOWGEM-package
7
+ Project-URL: Documentation, https://flowgem.readthedocs.io
8
+ Author: Muhammad Haris Mumtaz
9
+ Author-email: Gitte Kremling <gitte.kremling@uni-hamburg.de>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Requires-Python: >=3.12
13
+ Requires-Dist: hyperimpute>=0.1.17
14
+ Requires-Dist: joblib>=1.5.3
15
+ Requires-Dist: numpy>=2.5.1
16
+ Requires-Dist: scikit-learn>=1.9.0
17
+ Requires-Dist: torch>=2.13.0
18
+ Requires-Dist: tqdm>=4.68.4
19
+ Description-Content-Type: text/markdown
20
+
21
+ # FLOWGEM
22
+
23
+ **Generative sampling for missing data under MAR, via approximate Wasserstein gradient flows.**
24
+
25
+ [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/gkremling/FLOWGEM-package)
26
+ [![Python](https://img.shields.io/badge/python-3.12-blue)](https://www.python.org/)
27
+ [![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/gkremling/FLOWGEM-package/blob/main/LICENSE)
28
+
29
+ [![Tests](https://github.com/gkremling/FLOWGEM-package/actions/workflows/ci.yml/badge.svg)](https://github.com/gkremling/FLOWGEM-package/actions)
30
+
31
+ ## What is FLOWGEM?
32
+
33
+ FLOWGEM receives a dataset with missing values and generates a complete dataset sampled from the same distribution. It recovers the complete distribution of the data while preserving variances and correlations which keeps downstream analyses like means, quantiles, and correlations unbiased.
34
+
35
+ It targets data which is **Missing at Random (MAR)**, including non-monotone MAR. It is nonparametric and makes no assumption about the shape of your data. Under the hood it uses approximate Wasserstein gradient flow which iteratively transports a particle ensemble towards target distribution.
36
+
37
+ > **Note:** FLOWGEM currently supports **continuous features only**.
38
+ > Support for categorical and mixed type data is future work.
39
+
40
+ ## Installation
41
+
42
+ Install the released version from PyPI:
43
+
44
+ ```bash
45
+ pip install flowgem
46
+ ```
47
+
48
+ Or install the latest development version from GitHub:
49
+
50
+ ```bash
51
+ pip install git+https://github.com/gkremling/FLOWGEM-package.git
52
+ ```
53
+
54
+ ## Quick start
55
+
56
+ ```python
57
+ import numpy as np
58
+ from flowgem import FlowGEM
59
+
60
+ # Your data, with missing values marked as NaN
61
+ X = np.array([
62
+ [1.2, 0.8, 3.1],
63
+ [0.5, np.nan, 2.7],
64
+ [np.nan, 1.4, 2.9],
65
+ [2.1, 0.3, np.nan],
66
+ ])
67
+
68
+ # Fit and generate a complete sample from the same distribution
69
+ model = FlowGEM(T=1000)
70
+ X_complete = model.fit(X).generate()
71
+ ```
72
+
73
+ `X_complete` is a fully observed array (without missing value) which is drawn from estimated data distribution.
74
+
75
+ ## Features
76
+
77
+ - **Generative**:- generate entire dataset from the full data distribution while preserving variances and correlations.
78
+ - **Handles non-monotone MAR**:- works with arbitrary, scattered missingness patterns.
79
+ - **Nonparametric** :- No assumption about the shape of your data.
80
+ - **scikit-learn-style API**:- familiar `fit` / `generate` interface.
81
+ - **Tuning-lean**:- sensible defaults; bandwidth is set from a single heuristic
82
+
83
+ ## Key parameters
84
+
85
+ | Parameter | What it does | Default |
86
+ |-----------|--------------|---------|
87
+ | `T` | number of gradient-flow steps (more = better, slower) | `1000` |
88
+ | `eta` | step size η (smaller = finer, slower) | `0.01` |
89
+ | `sigma` | kernel bandwidth (`None` → chosen by heuristic) | `None` |
90
+
91
+ ## Documentation
92
+
93
+ Comprehensive and detailed documentation is available at [Read the Docs](https://flowgem.readthedocs.io).
94
+
95
+ ## Citation
96
+
97
+ The FLOWGEM method is based on:
98
+
99
+ > Kremling, G., Näf, J., & Lederer, J. (2026). *Generative Modeling under
100
+ > Non-Monotonic MAR Missingness via Approximate Wasserstein Gradient Flows.*
101
+
102
+ While using the package in course of your research, please cite this paper:
103
+
104
+ ```bibtex
105
+ @article{kremling2026flowgem,
106
+ title = {Generative Modeling under Non-Monotonic MAR Missingness
107
+ via Approximate Wasserstein Gradient Flows},
108
+ author = {Kremling, Gitte and N\"af, Jeffrey and Lederer, Johannes},
109
+ journal = {arXiv preprint arXiv:2604.04567},
110
+ year = {2026}
111
+ }
112
+ ```
113
+
114
+ ## License
115
+
116
+ This project is licensed under the MIT License — see the [LICENSE](https://github.com/gkremling/FLOWGEM-package/blob/main/LICENSE) file.
@@ -0,0 +1,96 @@
1
+ # FLOWGEM
2
+
3
+ **Generative sampling for missing data under MAR, via approximate Wasserstein gradient flows.**
4
+
5
+ [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/gkremling/FLOWGEM-package)
6
+ [![Python](https://img.shields.io/badge/python-3.12-blue)](https://www.python.org/)
7
+ [![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/gkremling/FLOWGEM-package/blob/main/LICENSE)
8
+
9
+ [![Tests](https://github.com/gkremling/FLOWGEM-package/actions/workflows/ci.yml/badge.svg)](https://github.com/gkremling/FLOWGEM-package/actions)
10
+
11
+ ## What is FLOWGEM?
12
+
13
+ FLOWGEM receives a dataset with missing values and generates a complete dataset sampled from the same distribution. It recovers the complete distribution of the data while preserving variances and correlations which keeps downstream analyses like means, quantiles, and correlations unbiased.
14
+
15
+ It targets data which is **Missing at Random (MAR)**, including non-monotone MAR. It is nonparametric and makes no assumption about the shape of your data. Under the hood it uses approximate Wasserstein gradient flow which iteratively transports a particle ensemble towards target distribution.
16
+
17
+ > **Note:** FLOWGEM currently supports **continuous features only**.
18
+ > Support for categorical and mixed type data is future work.
19
+
20
+ ## Installation
21
+
22
+ Install the released version from PyPI:
23
+
24
+ ```bash
25
+ pip install flowgem
26
+ ```
27
+
28
+ Or install the latest development version from GitHub:
29
+
30
+ ```bash
31
+ pip install git+https://github.com/gkremling/FLOWGEM-package.git
32
+ ```
33
+
34
+ ## Quick start
35
+
36
+ ```python
37
+ import numpy as np
38
+ from flowgem import FlowGEM
39
+
40
+ # Your data, with missing values marked as NaN
41
+ X = np.array([
42
+ [1.2, 0.8, 3.1],
43
+ [0.5, np.nan, 2.7],
44
+ [np.nan, 1.4, 2.9],
45
+ [2.1, 0.3, np.nan],
46
+ ])
47
+
48
+ # Fit and generate a complete sample from the same distribution
49
+ model = FlowGEM(T=1000)
50
+ X_complete = model.fit(X).generate()
51
+ ```
52
+
53
+ `X_complete` is a fully observed array (without missing value) which is drawn from estimated data distribution.
54
+
55
+ ## Features
56
+
57
+ - **Generative**:- generate entire dataset from the full data distribution while preserving variances and correlations.
58
+ - **Handles non-monotone MAR**:- works with arbitrary, scattered missingness patterns.
59
+ - **Nonparametric** :- No assumption about the shape of your data.
60
+ - **scikit-learn-style API**:- familiar `fit` / `generate` interface.
61
+ - **Tuning-lean**:- sensible defaults; bandwidth is set from a single heuristic
62
+
63
+ ## Key parameters
64
+
65
+ | Parameter | What it does | Default |
66
+ |-----------|--------------|---------|
67
+ | `T` | number of gradient-flow steps (more = better, slower) | `1000` |
68
+ | `eta` | step size η (smaller = finer, slower) | `0.01` |
69
+ | `sigma` | kernel bandwidth (`None` → chosen by heuristic) | `None` |
70
+
71
+ ## Documentation
72
+
73
+ Comprehensive and detailed documentation is available at [Read the Docs](https://flowgem.readthedocs.io).
74
+
75
+ ## Citation
76
+
77
+ The FLOWGEM method is based on:
78
+
79
+ > Kremling, G., Näf, J., & Lederer, J. (2026). *Generative Modeling under
80
+ > Non-Monotonic MAR Missingness via Approximate Wasserstein Gradient Flows.*
81
+
82
+ While using the package in course of your research, please cite this paper:
83
+
84
+ ```bibtex
85
+ @article{kremling2026flowgem,
86
+ title = {Generative Modeling under Non-Monotonic MAR Missingness
87
+ via Approximate Wasserstein Gradient Flows},
88
+ author = {Kremling, Gitte and N\"af, Jeffrey and Lederer, Johannes},
89
+ journal = {arXiv preprint arXiv:2604.04567},
90
+ year = {2026}
91
+ }
92
+ ```
93
+
94
+ ## License
95
+
96
+ This project is licensed under the MIT License — see the [LICENSE](https://github.com/gkremling/FLOWGEM-package/blob/main/LICENSE) file.