Skip to content

IndexError: index 10 is out of bounds for axis 0 with size 10 #36

Description

@saskra

I get the following error message with my X sized 10 by 22,206. It does not happen using your artificial example data:

X, y = make_classification(n_samples=s, n_features=f, n_informative=i,

Does anyone have an idea where it comes from?

MIFS = mifs.MutualInformationFeatureSelector(method='MRMR', verbose=2, k=3, n_jobs=39)
MIFS.fit(X, y)
Auto selected feature #1 : 97, MRMR : 1.2456349206349207
Auto selected feature #2 : 105, MRMR : 1.174697546314963
Auto selected feature #3 : 2221, MRMR : 1.1440936480371255
Auto selected feature #4 : 2638, MRMR : 1.1159469926404155
Auto selected feature #5 : 2648, MRMR : 1.075870166881065
Auto selected feature #6 : 108, MRMR : 1.0689369414517065
Auto selected feature #7 : 4244, MRMR : 1.0607923083006399
Auto selected feature #8 : 1760, MRMR : 1.0263351177165052
Auto selected feature #9 : 74, MRMR : 1.0321992176732293
Auto selected feature #10 : 1540, MRMR : 1.0072073023785721
Auto selected feature #11 : 1931, MRMR : 1.0046566589987855
Traceback (most recent call last):
  File "/snap/pycharm-professional/213/plugins/python/helpers/pydev/pydevd.py", line 1448, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/snap/pycharm-professional/213/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/saskra/PycharmProjects/mifs/examples/examples.py", line 67, in <module>
    MIFS.fit(X, y)
  File "/home/saskra/PycharmProjects/mifs/mifs/mifs.py", line 196, in fit
    feature_mi_matrix[s, F] = mi.get_mi_vector(self, F, S[-1])
IndexError: index 10 is out of bounds for axis 0 with size 10
python-BaseException

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions