Catalog PyPI
PACKAGE EXPLORERView in registry

afd-measures

PyPI

A collection of measures for Approximate Functional Dependencies in relational data.

Versions collected1
Direct dependencies7From release 1.0.0
Last observed20 Oct, 21:02 UTC

README

Version 1.0.0 documentation

AFD measures

A collection of measures for Approximate Functional Dependencies in relational data. Additionally, this repository contains all artifacts to "Approximately Measuring Functional Dependencies: a Comparative Study".

Short description

In real-world research projects, we often encounter unknown relational (tabular) datasets. In order to process them efficiently, functional dependencies (FDs) give us structural insight into relational data, describing strong relationships between columns. Errors in real-world data let traditional FD detection techniques fail. Hence we consider approximate FDs (AFDs): FDs that approximately hold in relational data.

This repository contains the implemented measures as well as the all artifacts to "Approximately Measuring Functional Dependencies: a Comparative Study".

Overview

  • code: this directory holds the code used to generate the results in the paper
    • afd_measures: all Python source code relating to the implemented AFD measures
    • experiments: Jupyter notebooks containing the processing steps to generate the results, figures or tables in the paper
    • synthetic_data: all Python source code relating to the synthetic data generation process
  • data: the datasets used in the paper
    • rwd: manually annotated dataset of files found on the web (see data/ground_truth.csv)
    • rwd_e: datasets from rwd with errors introduced into them. Generated by the notebook code/experiments/create_rwd_e_dataset.ipynb.
    • syn_e: synthetic dataset generated focussing on errors. Generated by the notebook code/experiments/create_syn_e.ipynb
    • syn_u: synthetic dataset generated focussing on left-hand side uniqueness. Generated by the notebook code/experiments/create_syn_u.ipynb
    • syn_s: synthetic dataset generated focussing on right-hand side skewness. Generated by the notebook code/experiments/create_syn_s.ipynb
  • paper: A full version of the paper including all proofs.
  • results: results of applying the AFD measures to the datasets.

Installation (measure library)

This library can be found on PyPI: afd-measures. Install it using pip like this:

pip install afd-measures

Usage (measure library)

To 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. You can start with this Python snippet to analyse your own data (a CSV file in this example):

import afd_measures
import pandas as pd

my_data = pd.read_csv("my_amazing_table.csv")
print(afd_measures.mu_plus(my_data, lhs="X", rhs="Y"))

Installation (experiments)

To revisit the experiments that we did, clone this repository and install all requirements with Poetry (preferred) or Conda.

Poetry

Install 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.

$ poetry install -E experiments
$ jupyter lab

Conda

Create a new environment from the conda_environment.yaml file, activate it and run Jupyter lab to investigate the code.

$ conda create -f conda_environment.yaml
$ jupyter lab

Dataset References

In addition to this repository, we made our benchmark also available on Zenodo: find it here

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.018 Oct 20237

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
marcelpa/afd_comparative_study

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:02 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:bb13d3b116daf01564542fb29adfb7bfe910e2a330238e3ee72e11947549218f