Last active
April 18, 2019 20:58
-
-
Save xiaowei1234/4f1e473595302c0e6acea16c1f2c0d70 to your computer and use it in GitHub Desktop.
ContinuousDomain example
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
from sklearn2pmml.decoration import ContinuousDomain | |
from sklearn.impute import SimpleImputer | |
cont_d = ContinuousDomain(missing_value_replacement=350, missing_value_treatment='as_value' | |
, missing_values=[float("NaN"), -1], outlier_treatment='as_extreme_values' | |
, low_value=300, high_value=1500) | |
wrap = DataFrameMapper([ | |
('amount', [cont_d, SimpleImputer(), FunctionTransformer(np.log1p, validate=False)]) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment