Last active
November 8, 2018 00:18
-
-
Save xiaowei1234/d64f22fc925b5871e1456fef599c47b6 to your computer and use it in GitHub Desktop.
sklearn2pmml feature engineering and creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
featureU = FeatureUnion([ | |
('transformations', DataFrameMapper([ | |
(trend_vars, ExpressionTransformer("X[:, 0] - X[:, 1]")) | |
, (to_logs, make_pipeline(Imputer(strategy='median') | |
, FunctionTransformer(np.log1p) | |
)) | |
]) | |
) | |
, ('identity', DataFrameMapper([(non_trans_vars, ContinuousDomain())])) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment