EpistasisLab / EpistasisLab/scikit-rebate

Issue with Error message stating inputs are of wrong sizes

Open
#48 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
420
Forks
72
Avg merge
3m
Merged PRs (30d)
3

Description

I am getting the following error, my inputs are of the correct input size. I am not sure where to contact the authors for assistance so writing this up as an issue. Xtrain is all ones and zeros (it comes from a 1hot encoder) and y is all ones and zeros. Example code given in documentation works fine so not an install issue.

I used the following code (I am running on a 16 core machine):
fs = ReliefF(n_features_to_select=2000, n_neighbors=100,n_jobs=-1)
fs.fit(Xtrain, y)

Shapes for additional info:
>>> y.shape
(3672,)
>>> Xtrain.shape
(3672, 1688789)

Error message:
Traceback (most recent call last):
File "reliefChr19.py", line 180, in
fs.fit(Xtrain, y)
File "/usr/local/lib/python2.7/dist-packages/skrebate/relieff.py", line 154, in fit
self.attr = self._get_attribute_info() #Examines each feature and applies discrete_threshold to determine variable type.
File "/usr/local/lib/python2.7/dist-packages/skrebate/relieff.py", line 280, in _get_attribute_info
zlen = len(np.unique(z))
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/arraysetops.py", line 210, in unique
return _unique1d(ar, return_index, return_inverse, return_counts)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/arraysetops.py", line 279, in _unique1d
flag = np.concatenate(([True], aux[1:] != aux[:-1]))
ValueError: all the input arrays must have same number of dimensions

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.