Created
November 8, 2018 00:24
-
-
Save xiaowei1234/e2bfa888c1cba39e8ffc7b9d7f70ce7b to your computer and use it in GitHub Desktop.
sklearn2pmml pipe
This file contains hidden or 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
pl = PMMLPipeline([ | |
('featureUnion', featureU) | |
, ('impute', Imputer(strategy='median')) | |
, ('standardize', StandardScaler()) | |
# , ('interactions', PolynomialFeatures(include_bias=False)) | |
# , ('clf', SGDClassifier(alpha=0.008, l1_ratio=0.13, max_iter=450,loss='log' | |
# ,penalty='elasticnet', n_iter=None, tol=None))# alpha = 0.8 | |
, ('clf', LogisticRegression(penalty='l2', max_iter=500, C=0.8)) | |
]) | |
pl.fit(X, y) | |
sklearn2pmml(pl, '../outputs/pmml_file.pmml', with_repr=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment