Made the following changes
1. Inherit from BaseEstimator to enable pretty printing
2. Add transform function