You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve TruncatedSVD.transform on sparse csc matrices #16828
import scipy.sparse as ss
from sklearn.decomposition import TruncatedSVD
X = ss.random(1000, 100, format='csc')
tsvd = TruncatedSVD().fit(X)
tsvd.transform(X)
Currently, in the last line, transform(X) will first convert X from csc to csr and then apply a dot product. I think this conversion is unnecessary, costs additional time, and one should better rely on scipy.sparse (or safe_sparse_dot) to convert if necessary.
It has been 2 days since this issue was raised so I added my PR and benchmark. This is my first commit and I have tried to follow the guidelines as much as I could. Please let me know if there are any places I need to fix.
Activity
shivamgargsya commentedon Apr 2, 2020
Can work on this.
PandaTinker commentedon Apr 4, 2020
It has been 2 days since this issue was raised so I added my PR and benchmark. This is my first commit and I have tried to follow the guidelines as much as I could. Please let me know if there are any places I need to fix.