Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
update on the auto-intent resolving (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzhang-gp committed Dec 20, 2019
1 parent a51b827 commit 8013a61
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions foreshadow/smart/intent_resolving/core/heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def convert_to_numeric(series: pd.Series) -> pd.Series:


def is_number_as_string(
series: pd.Series, shrinkage_threshold: float = 0.5
series: pd.Series, shrinkage_threshold: float = 0.7
) -> bool:
"""Check if string can be numerical.
Expand Down Expand Up @@ -224,7 +224,7 @@ def _maybe_zipcode(raw_s: pd.Series, threshold: float = 0.95) -> int:
return points


def maybe_real_as_enum(
def maybe_real_as_categorical(
df: pd.DataFrame, max_n_distinct: int = 20
) -> pd.Series:
"""Evaluate if feature column might be categorical.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
-- MetaDataSetFeaturizerViaLambda
-- NGramFeaturizer
-- Chars2VecFeaturizer
-- FastTextFeaturizer
This __init__.py file also contains defintions for the followig helper class:
-- FeaturizerCurator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,12 @@ def __map_features_to_feature_columns(
else ("attribute_name",)
),
)

if merged.isnull().any(axis=None):
sample_cols = [
col
for col in merged.columns
if "sample" in col and "samples" not in col
]
if merged.drop(sample_cols, axis=1).isnull().any(axis=None):
raise AssertionError(
"Imperfect mapping from features to data set detected."
)
Expand Down

0 comments on commit 8013a61

Please sign in to comment.