Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pfdtane nongeneralized #6

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
16 changes: 12 additions & 4 deletions cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Task(StrEnum):
class Algorithm(StrEnum):
pyro = auto()
tane = auto()
pfdtane = auto()
hyfd = auto()
fd_mine = auto()
dfd = auto()
Expand Down Expand Up @@ -131,15 +132,15 @@ class Algorithm(StrEnum):
“Functional dependency discovery: an experimental evaluation of seven
algorithms” paper by T. Papenbrock et al.

Algorithms: PYRO, TANE, HYFD, FD_MINE, DFD, DEP_MINER, FDEP, FUN, FASTFDS, AID
Algorithms: PYRO, TANE, PFDTANE, HYFD, FD_MINE, DFD, DEP_MINER, FDEP, FUN, FASTFDS, AID
Default: HYFD
'''
AFD_HELP = '''Discover minimal non-trivial approximate functional
dependencies. Approximate functional dependencies are defined in the
“Efficient Discovery of Approximate Dependencies” paper by S. Kruse and
F. Naumann.

Algorithms: PYRO, TANE
Algorithms: PYRO, TANE, PFDTANE
Default: PYRO
'''
FD_VERIFICATION_HELP = '''Verify whether a given exact functional dependency
Expand Down Expand Up @@ -176,6 +177,11 @@ class Algorithm(StrEnum):
Algorithm for Discovering Functional and Approximate Dependencies” by
Y. Huntala et al.
'''
PFDTANE_HELP = '''A TANE-based algorithm for discovery of probabilistic
functional dependencies. For more information, refer to “Functional Dependency
Generation and Applications in pay-as-you-go data integration systems” by
Daisy Zhe Wang et al.
'''
HYFD_HELP = '''A modern algorithm for discovery of exact functional
dependencies. One of the most high-performance algorithms for this task. For
more information, refer to “A Hybrid Approach to Functional Dependency
Expand Down Expand Up @@ -252,6 +258,7 @@ class Algorithm(StrEnum):
ALGO_HELP_PAGES = {
Algorithm.pyro: PYRO_HELP,
Algorithm.tane: TANE_HELP,
Algorithm.pfdtane: PFDTANE_HELP,
Algorithm.hyfd: HYFD_HELP,
Algorithm.fd_mine: FD_MINE_HELP,
Algorithm.dfd: DFD_HELP,
Expand All @@ -268,12 +275,12 @@ class Algorithm(StrEnum):
TaskInfo = namedtuple('TaskInfo', ['algos', 'default'])

TASK_INFO = {
Task.fd: TaskInfo([Algorithm.pyro, Algorithm.tane, Algorithm.hyfd,
Task.fd: TaskInfo([Algorithm.pyro, Algorithm.tane, Algorithm.pfdtane, Algorithm.hyfd,
Algorithm.fd_mine, Algorithm.dfd, Algorithm.dep_miner,
Algorithm.fdep, Algorithm.fun, Algorithm.fastfds,
Algorithm.aid],
Algorithm.hyfd),
Task.afd: TaskInfo([Algorithm.pyro, Algorithm.tane],
Task.afd: TaskInfo([Algorithm.pyro, Algorithm.tane, Algorithm.pfdtane],
Algorithm.pyro),
Task.fd_verification: TaskInfo([Algorithm.naive_fd_verifier],
Algorithm.naive_fd_verifier),
Expand All @@ -286,6 +293,7 @@ class Algorithm(StrEnum):
ALGOS = {
Algorithm.pyro: desbordante.Pyro,
Algorithm.tane: desbordante.Tane,
Algorithm.pfdtane: desbordante.PFDTane,
Algorithm.hyfd: desbordante.HyFD,
Algorithm.fd_mine: desbordante.FdMine,
Algorithm.dfd: desbordante.DFD,
Expand Down
3 changes: 2 additions & 1 deletion src/core/algorithms/algorithm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace algos {
using AlgorithmTypes =
std::tuple<Depminer, DFD, FastFDs, FDep, Fd_mine, Pyro, Tane, FUN, hyfd::HyFD, Aid, Apriori,
metric::MetricVerifier, DataStats, fd_verifier::FDVerifier, HyUCC, PyroUCC,
cfd::FDFirstAlgorithm, ACAlgorithm, UCCVerifier, Faida>;
cfd::FDFirstAlgorithm, ACAlgorithm, UCCVerifier, Faida, PFDTane>;

// clang-format off
/* Enumeration of all supported non-pipeline algorithms. If you implement a new
Expand All @@ -27,6 +27,7 @@ BETTER_ENUM(AlgorithmType, char,
fdmine,
pyro,
tane,
pfdtane,
fun,
hyfd,
aidfd,
Expand Down
1 change: 1 addition & 0 deletions src/core/algorithms/algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "algorithms/fd/fdep/fdep.h"
#include "algorithms/fd/fun/fun.h"
#include "algorithms/fd/hyfd/hyfd.h"
#include "algorithms/fd/pfdtane/pfdtane.h"
#include "algorithms/fd/pyro/pyro.h"
#include "algorithms/fd/tane/tane.h"
#include "algorithms/statistics/data_stats.h"
Expand Down
9 changes: 9 additions & 0 deletions src/core/algorithms/fd/pfdtane/enums.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

#include <enum.h>

namespace algos {

BETTER_ENUM(ErrorMeasure, char, per_tuple = 0, per_value)

}
Loading