2
我想用MLeap來部署Spark ML機器學習模型,並用它們來實時預測。Scala to Java 8 MLeap Translation
創作者推出了Scala教程,但我需要支持Java 8代碼庫。
我將如何在Java中實現8以下代碼:
val pipeline = SparkUtil.createPipelineModel(uid = "pipeline", Array(featureModel, rfModel))
val sbc = SparkBundleContext()
for(bf <- managed(BundleFile("jar:file:/tmp/mnist.model.rf.zip"))) {
pipeline.writeBundle.save(bf)(sbc).get
}
val bundle = (for(bundleFile <- managed(BundleFile("jar:file:/tmp/simple-spark-pipeline.zip"))) yield {
bundleFile.loadMleapBundle().get
}).opt.get
如果我有自定義估計/變形金剛? – Gevorg