# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'code'}

packages = \
['afd_measures']

package_data = \
{'': ['*']}

install_requires = \
['numpy>=1.23.5,<2.0.0', 'pandas>=1.5.2,<2.0.0']

extras_require = \
{'experiments': ['tqdm>=4.64.1,<5.0.0',
                 'joblib>=1.2.0,<2.0.0',
                 'scikit-learn>=1.1.3,<2.0.0',
                 'jupyterlab>=3.5.0,<4.0.0',
                 'plotly>=5.13.0,<6.0.0']}

setup_kwargs = {
    'name': 'afd-measures',
    'version': '1.0.0',
    'description': 'A collection of measures for Approximate Functional Dependencies in relational data.',
    'long_description': '# AFD measures\n\nA collection of measures for Approximate Functional Dependencies in relational data. Additionally, this repository contains all artifacts to "Approximately Measuring Functional Dependencies: a Comparative Study".\n\n## Short description\n\nIn real-world research projects, we often encounter unknown relational (tabular)\ndatasets. In order to process them efficiently, functional dependencies (FDs) give us structural\ninsight into relational data, describing strong relationships between columns. Errors in real-world\ndata let traditional FD detection techniques fail. Hence we consider approximate FDs (AFDs): FDs\nthat approximately hold in relational data. \n\nThis repository contains the implemented measures as well as the all artifacts to "Approximately Measuring Functional Dependencies: a Comparative Study".\n\n## Overview\n\n* `code`: this directory holds the code used to generate the results in the paper\n\t* `afd_measures`: all Python source code relating to the implemented AFD measures\n\t* `experiments`: Jupyter notebooks containing the processing steps to generate the results, figures or tables in the paper\n\t* `synthetic_data`: all Python source code relating to the synthetic data generation process\n* `data`: the datasets used in the paper\n\t* `rwd`: manually annotated dataset of files found on the web (see `data/ground_truth.csv`)\n\t* `rwd_e`: datasets from `rwd` with errors introduced into them. Generated by the notebook `code/experiments/create_rwd_e_dataset.ipynb`.\n\t* `syn_e`: synthetic dataset generated focussing on errors. Generated by the notebook `code/experiments/create_syn_e.ipynb`\n\t* `syn_u`: synthetic dataset generated focussing on left-hand side uniqueness. Generated by the notebook `code/experiments/create_syn_u.ipynb`\n\t* `syn_s`: synthetic dataset generated focussing on right-hand side skewness. Generated by the notebook `code/experiments/create_syn_s.ipynb`\n* `paper`: A full version of the paper including all proofs.\n* `results`: results of applying the AFD measures to the datasets.\n\n## Installation (measure library)\n\nThis library can be found on [PyPI](https://pypi.org): [`afd-measures`](https://pypi.org/project/afd-measures). Install it using `pip` like this:\n\n```sh\npip install afd-measures\n```\n\n### Usage (measure library)\n\nTo apply one of the measures to your data, you will need a pandas DataFrame of your relation. Pandas will automatically installed as a dependency of `afd-measures`.\nYou can start with this Python snippet to analyse your own data (a CSV file in this example):\n```python\nimport afd_measures\nimport pandas as pd\n\nmy_data = pd.read_csv("my_amazing_table.csv")\nprint(afd_measures.mu_plus(my_data, lhs="X", rhs="Y"))\n```\n\n## Installation (experiments)\n\nTo revisit the experiments that we did, clone this repository and install all requirements with [Poetry](https://python-poetry.org) (preferred) or [Conda](https://conda.io).\n\n### Poetry\n\nInstall the requirements using poetry. Use the extra flag "experiments" to install all additional requirements for the experiments to work. This includes (amongst others) [Jupyter Lab](https://jupyter.org/).\n```sh\n$ poetry install -E experiments\n$ jupyter lab\n```\n\n### Conda\n\nCreate a new environment from the `conda_environment.yaml` file, activate it and run Jupyter lab to investigate the code.\n\n```sh\n$ conda create -f conda_environment.yaml\n$ jupyter lab\n```\n\n## Dataset References\n\nIn addition to this repository, we made our benchmark also available on Zenodo: [find it here](https://www.zenodo.org/record/8098909)\n\n* `adult.csv`: Dua, D. and Graff, C. (2019). [UCI Machine Learning Repository](http://archive.ics.uci.edu/ml). Irvine, CA: University of California, School of Information and Computer Science. \n* `claims.csv`: TSA Claims Data 2002 to 2006, [published by the U.S. Department of Homeland Security](https://www.dhs.gov/tsa-claims-data).\n* `dblp10k.csv`: Frequency-aware Similarity Measures. Lange, Dustin; Naumann, Felix (2011). 243–248. [Made available as DBLP Dataset 2](https://hpi.de/naumann/projects/repeatability/datasets/dblp-dataset.html).\n* `hospital.csv`: Hospital dataset used in Johann Birnick, Thomas Bläsius, Tobias Friedrich, Felix Naumann, Thorsten Papenbrock, and Martin Schirneck. 2020. Hitting set enumeration with partial information for unique column combination discovery. Proc. VLDB Endow. 13, 12 (August 2020), 2270–2283. https://doi.org/10.14778/3407790.3407824). [Made available as part the dataset collection to that paper.](https://owncloud.hpi.de/s/j6Z0yvXC0qhtGCk/download)\n* `t_biocase_...` files: t\\_bioc\\_... files used in Johann Birnick, Thomas Bläsius, Tobias Friedrich, Felix Naumann, Thorsten Papenbrock, and Martin Schirneck. 2020. Hitting set enumeration with partial information for unique column combination discovery. Proc. VLDB Endow. 13, 12 (August 2020), 2270–2283. https://doi.org/10.14778/3407790.3407824). [Made available as part the dataset collection to that paper.](https://owncloud.hpi.de/s/j6Z0yvXC0qhtGCk/download)\n* `tax.csv`: Tax dataset used in Johann Birnick, Thomas Bläsius, Tobias Friedrich, Felix Naumann, Thorsten Papenbrock, and Martin Schirneck. 2020. Hitting set enumeration with partial information for unique column combination discovery. Proc. VLDB Endow. 13, 12 (August 2020), 2270–2283. https://doi.org/10.14778/3407790.3407824). [Made available as part the dataset collection to that paper.](https://owncloud.hpi.de/s/j6Z0yvXC0qhtGCk/download)\n',
    'author': 'Marcel Parciak',
    'author_email': 'marcel.parciak@uhasselt.be',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/MarcelPa/AFD_comparative_study',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'extras_require': extras_require,
    'python_requires': '>=3.9,<4.0',
}


setup(**setup_kwargs)
