Get PCA reduction to actually work (needs sklearn)

The previous version actually did nothing. This requires sklearn, but
only if you actually use PCA.