Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)