pyod icon indicating copy to clipboard operation
pyod copied to clipboard

Does input data not support sparse matrix ?

Open z595054650 opened this issue 4 years ago • 2 comments

train_X is A sparse matrix call fit(train_X) raise TypeError('A sparse matrix was passed, but dense ' TypeError: A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.

z595054650 avatar Nov 05 '19 12:11 z595054650

I think only certain models support that. Most of them are not. So you have to do some conversion first. Will take this down for future development.

yzhao062 avatar Nov 05 '19 15:11 yzhao062

So you have to do some conversion first.

Sparse matrices are usually used where dense ones are not feasible.

KOLANICH avatar Nov 30 '21 23:11 KOLANICH