Skip to content

Commit

Permalink
Merge pull request #88 from ealcobaca/attr-conc-arg
Browse files Browse the repository at this point in the history
Added a default value for attr_conc's 'max_attr_num' parameter
  • Loading branch information
ealcobaca committed Jul 2, 2020
2 parents b2d0f50 + 1291b7a commit 80a0fc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pymfe/info_theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _calc_conc(cls,
@classmethod
def ft_attr_conc(cls,
C: np.ndarray,
max_attr_num: t.Optional[int] = None,
max_attr_num: t.Optional[int] = 12,
random_state: t.Optional[int] = None) -> np.ndarray:
"""Compute concentration coef. of each pair of distinct attributes.
Expand Down
6 changes: 3 additions & 3 deletions tests/test_infotheo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class TestInfoTheo:
###################
# Categorical data
###################
(1, "attr_conc", [0.01682327, 0.04715381], False),
(1, "attr_conc", [0.017922703, 0.057748884], False),
(1, "attr_ent", [0.59014829, 0.33852165], False),
(1, "class_conc", [0.02313025, 0.04485300], False),
(1, "class_ent", 0.99857554, False),
(1, "eq_num_attr", 52.14040170, False),
(1, "joint_ent", [1.56957216, 0.33197232], False),
(1, "mut_inf", [0.01915167, 0.03918710], False),
(1, "ns_ratio", 29.81446298, False),
(1, "attr_conc", [0.01682327, 0.04715381], True),
(1, "attr_conc", [0.017922703, 0.057748884], True),
(1, "attr_ent", [0.59014829, 0.33852165], True),
(1, "class_conc", [0.02313025, 0.04485300], True),
(1, "class_ent", 0.99857554, True),
Expand Down Expand Up @@ -78,7 +78,7 @@ def test_ft_methods_infotheo(self, dt_id, ft_name, exp_value, precompute):
precomp_group = GNAME if precompute else None
X, y = load_xy(dt_id)
mfe = MFE(
groups=[GNAME], features=[ft_name]).fit(
groups=[GNAME], features=[ft_name], random_state=1234).fit(
X.values, y.values, precomp_groups=precomp_group)
value = mfe.extract()[1]

Expand Down

0 comments on commit 80a0fc8

Please sign in to comment.