Closed
Description
Describe the workflow you want to enable
GaussianRandomProjection
and SparseRandomProjection
should have an inverse_transform()
method.
Describe your proposed solution
Simply add the inverse_transform()
method, with the appropriate input validation and tests, and return X @ np.linalg.pinv(self.components_.T)
.
Describe alternatives you've considered, if relevant
N/A
Additional context
My understanding is that every transformer that performs a reversible transformation should have an inverse_transform()
method, unless there's a really good reason not to (e.g., if it's terribly inefficient, or there's a better alternative). Was the inverse_transform()
left out because it's too inefficient?