EpistasisLab / scikit-rebate

A scikit-learn-compatible Python implementation of ReBATE, a suite of Relief-based feature selection algorithms for Machine Learning.
https://EpistasisLab.github.io/scikit-rebate/
MIT License
409 stars 73 forks source link

can't fit a sparse matrix as training set using object.fit() #18

Open tbonewmy opened 7 years ago

tbonewmy commented 7 years ago

can't fit a sparse matrix as training set using object.fit() and since the sparse matrix is [16000*3231961]. directly converting it to numpy array like is not practical.

Process to reproduce the issue

[ordered list the process to finding and recreating the issue, example below]

User creates a sparse matrix X and some array y, row number of X = length of y User calls ReliefF fit(X,y) ValueError: setting an array element with a sequence.

rhiever commented 7 years ago

This is a use case we should consider when going forward with the Relief algorithm set. Can we support sparse matrices with these algorithms?

AFAIK, none of the commonly-used distance matrix calculation functions in numpy/scipy/scikit-learn support sparse matrices.