Casting to sparse matrix in project.py
jteijema opened this issue · comments
if isinstance(feature_matrix, np.ndarray):
feature_matrix = csr_matrix(feature_matrix)
if not isinstance(feature_matrix, csr_matrix):
raise ValueError(
"The feature matrix should be convertible to type "
"scipy.sparse.csr.csr_matrix."
)
We're casting all feature matrices to sparse matrix. This might be inefficient in some cases when compared to using a dense matrix.
Why was this format chosen?