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

Using numpy arrays as data source may lead to errors if inferred encoding is used #193

Open
PGijsbers opened this issue Apr 29, 2023 · 0 comments
Labels

Comments

@PGijsbers
Copy link
Member

X, y = load_digits(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(
    X, y, stratify=y, random_state=0
)

# Add checks on individuals (reproducibility)
gama.fit(X_train, y_train)

GAMA infers some features as categoricals (which is expected behavior, though incorrect).
This in turn creates new feature names, now some are int and some are str, e.g.: ['1_1', '1_2', 2, 3, ...]
This results in an error during evaluation: <class 'TypeError'> Feature names are only supported if all input features have string name.

Postponing on fixing this until #169 is merged.

For people encountering issues with this behavior, please use pandas dataframes for now.

@PGijsbers PGijsbers added the bug label Apr 29, 2023
PGijsbers added a commit that referenced this issue Apr 29, 2023
Because some pixels were inferred as categorical.
See also #193
PGijsbers added a commit that referenced this issue Apr 29, 2023
* Move tool configurations together

* Removed unused imports, pass ruff linter

* Remove the GAMA Dashboard

* Bump black

* Bump mypy

* Replace flake8 with ruff

* Move mypy configuration to pyproject.toml

* Remove optional requirements for Dashboard

* Bump pre-commit

* Fix an issue introduced by the new eps penalty in sklearn 1.2

The default value changed from 1e-15 to "auto" that is equivalent to np.finfo(y_pred.dtype).eps.

* Explicitly add datetime format for parsing from log

* Load data as pandas dataframe

Because some pixels were inferred as categorical.
See also #193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant