I'm trying to reduce dimension of data set by computing what can be the best n_components using truncated SVD but its taking lot of time.
from sklearn.decomposition import TruncatedSVD
pca = TruncatedSVD()
pca.n_components = 10048
pca_data = pca.fit_transform(X_tr)
percentage_var_explained = pca.explained_variance_ /
np.sum(pca.explained_variance_);cum_var_explained = np.cumsum(percentage_var_explained)