microsoft / microsoft/reliableAI

Resolving Functional Dependency (FD) in XLearner

Open
#10 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
54
Forks
14
Avg merge
11d 10h
Merged PRs (30d)
1

Description

By default, in XLearner (XLearner.py), the parameter resolve_fd in the learn function is set to True.

As a result, the resolve_fd method is called. From my understanding, if the user does not provide any functional dependencies (FDs), resolve_fd will create FD edges. These edges are created between two variables X and Y if, for any $ x_i, x_j \in X $, the condition $y_i = y_j$ holds only when $ x_i = x_j $.

However, this behavior is not explained in the paper (unless I missed something).

Questions

  1. Is there a specific reason behind this logic?
  2. Should this be kept as the default behavior?
  3. Does this apply only to categorical values?

Code from resolve_fd at XLearner.py file under XDA/src

        if fd_edges is not None: fd_list = set(fd_edges)
        else:
            for cmb in permutations(cols, 2):
                col1 = cmb[0]
                col2 = cmb[1]
                if (col2, col1) in fd_list: continue
                mapper = {}
                has_dup = False
                if count[col2] == 1 or count[col2] > count[col1]:
                    continue
                for index, row in self.df.iterrows():
                    key = row[col1]
                    val = row[col2]
                    if key in mapper and mapper[key] != val:
                        has_dup = True
                        break
                    if key not in mapper:
                        mapper[key] = val
                if not has_dup:
                    fd_list.add(cmb)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read XDA/src/XLearner.py, starting at the learn function and its resolve_fd method, then compare the implementation with the paper. Done means the rationale for automatic FD edges, whether the behavior applies to categorical values, and the decision about the resolve_fd default are documented or clearly resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.