Skip to content

GridREx is not tested! #171

Description

@MatteoMagnini

I have tried to use GridREx to extract rules in a regression task, however it rises an error:

File "/opt/homebrew/Caskroom/miniforge/base/envs/prima/lib/python3.9/site-packages/psyke/init.py", line 251, in extract
return self._extract(data, mapping)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prima/lib/python3.9/site-packages/psyke/extraction/hypercubic/gridex/init.py", line 32, in _extract
return self._create_theory(dataframe)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prima/lib/python3.9/site-packages/psyke/extraction/hypercubic/init.py", line 67, in _create_theory
body = cube.body(variables, self._ignore_dimensions(), self.unscale, self.normalization)
File "/opt/homebrew/Caskroom/miniforge/base/envs/prima/lib/python3.9/site-packages/psyke/extraction/hypercubic/hypercube.py", line 292, in body
list(variables.values()), [to_rounded_real(v) for v in coefs],
File "/opt/homebrew/Caskroom/miniforge/base/envs/prima/lib/python3.9/site-packages/psyke/extraction/hypercubic/hypercube.py", line 292, in
list(variables.values()), [to_rounded_real(v) for v in coefs],
File "/opt/homebrew/Caskroom/miniforge/base/envs/prima/lib/python3.9/site-packages/psyke/utils/logic.py", line 159, in to_rounded_real
return real(round(n, PRECISION))
TypeError: type numpy.ndarray doesn't define round method

I have an idea to solve it, however I have found out that the algorithm lacks tests! This is an issue of paramount importance that should be addressed asap.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions