How to use the sklearn2pmml.PMMLPipeline function in sklearn2pmml

To help you get started, we’ve selected a few sklearn2pmml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GenTang / intro_ds / ch04-linear / model_persistence.py View on Github external
def saveAsPMML(data, modelPath):
    """
    利用sklearn2pmml将模型存储为PMML
    """
    model = PMMLPipeline([
	("regressor", linear_model.LinearRegression())])
    model.fit(data[["x"]], data["y"])
    sklearn2pmml(model, "linear.pmml", with_repr=True)

sklearn2pmml

Python library for converting Scikit-Learn pipelines to PMML

AGPL-3.0
Latest version published 10 days ago

Package Health Score

76 / 100
Full package analysis

Similar packages