November 2017
Intermediate to advanced
374 pages
10h 19m
English
There's a gotcha with truncated SVDs. Depending on the state of the random number generator, successive fittings of truncated SVD can flip the signs of the output. In order to avoid this, it's advisable to fit truncated SVD once, and then use transforms from then on. This is another good reason for pipelines!
To carry this out, do the following:
tsvd = TruncatedSVD(2)tsvd.fit(iris_X)tsvd.transform(iris_X)
Read now
Unlock full access