我在sparkmllib中训练了一个模型。现在,我要将其保存在泡菜文件中。
我使用了下面的过程,但是它以不同的格式存储。
pipeline = Pipeline(stages=[tokenizer,hashTF,hashIDF,nbClass])
prediction = pipeline.fit(training_df)
prediction.save("path")
model = PipelineModel.load("path")
pre = model.transform(testing_df)
pre.show()