All Projects → autodeployai → pmml4s-spark

autodeployai / pmml4s-spark

Licence: Apache-2.0 license
PMML scoring library for Spark as SparkML Transformer

Programming Languages

scala
5932 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to pmml4s-spark

pmml4s
PMML scoring library for Scala
Stars: ✭ 49 (+206.25%)
Mutual labels:  deployment, ml, pmml, pmml-scoring-library
pypmml
Python PMML scoring library
Stars: ✭ 65 (+306.25%)
Mutual labels:  ml, pmml, pmml-scoring-library
awesome-AI-kubernetes
❄️ 🐳 Awesome tools and libs for AI, Deep Learning, Machine Learning, Computer Vision, Data Science, Data Analytics and Cognitive Computing that are baked in the oven to be Native on Kubernetes and Docker with Python, R, Scala, Java, C#, Go, Julia, C++ etc
Stars: ✭ 95 (+493.75%)
Mutual labels:  ml, spark-ml
ai-deployment
关注AI模型上线、模型部署
Stars: ✭ 149 (+831.25%)
Mutual labels:  pmml, spark-ml
DMIA ProductionML 2021 Spring
Репозиторий направления Production ML, весна 2021
Stars: ✭ 42 (+162.5%)
Mutual labels:  deployment, ml
Ml Dl Scripts
The repository provides usefull python scripts for ML and data analysis
Stars: ✭ 119 (+643.75%)
Mutual labels:  deployment, ml
fdp-modelserver
An umbrella project for multiple implementations of model serving
Stars: ✭ 47 (+193.75%)
Mutual labels:  pmml, spark-ml
Cruiser
A Pharo Tool to package applications
Stars: ✭ 41 (+156.25%)
Mutual labels:  deployment
unity-now
▲ Vercel Now plugin for Unity. Deploy WebGL builds with ease
Stars: ✭ 21 (+31.25%)
Mutual labels:  deployment
react-production-deployment
Deploy your React app to production on Netlify, Vercel and Heroku
Stars: ✭ 51 (+218.75%)
Mutual labels:  deployment
QtRelease Windows
practice project,Helps with QT software deployment on Windows
Stars: ✭ 13 (-18.75%)
Mutual labels:  deployment
cli
Polyaxon Core Client & CLI to streamline MLOps
Stars: ✭ 18 (+12.5%)
Mutual labels:  ml
yoda
Simple tool to dockerize and manage deployment of your project
Stars: ✭ 69 (+331.25%)
Mutual labels:  deployment
FlutterIOT
Visit our website for more Mobile and Web applications
Stars: ✭ 66 (+312.5%)
Mutual labels:  ml
Data-pipeline-project
Data pipeline project
Stars: ✭ 18 (+12.5%)
Mutual labels:  deployment
DeepBump
Normal & height maps generation from single pictures
Stars: ✭ 185 (+1056.25%)
Mutual labels:  ml
zingg
Scalable identity resolution, entity resolution, data mastering and deduplication using ML
Stars: ✭ 655 (+3993.75%)
Mutual labels:  ml
mlapp
MLApp is a Python library for building scalable data science solutions that meet modern software engineering standards.
Stars: ✭ 42 (+162.5%)
Mutual labels:  ml
neptune-client
📒 Experiment tracking tool and model registry
Stars: ✭ 348 (+2075%)
Mutual labels:  ml
Temps
λ A selfhostable serverless function runtime. Inspired by zeit now.
Stars: ✭ 15 (-6.25%)
Mutual labels:  deployment

PMML4S-Spark

PMML4S-Spark is a PMML (Predictive Model Markup Language) scoring library for Spark as SparkML Transformer.

Features

PMML4S-Spark is the Spark wrapper of PMML4S, you can see PMML4S for details.

Prerequisites

  • Spark >= 2.0.0

Installation

PMML4S-Spark is available from the maven central.

Latest release: Maven Central

SBT users
libraryDependencies += "org.pmml4s" %%  "pmml4s-spark" % pmml4sSparkVersion
Maven users
<dependency>
  <groupId>org.pmml4s</groupId>
  <artifactId>pmml4s-spark_${scala.version}</artifactId>
  <version>${pmml4s-spark.version}</version>
</dependency>

Use PMML for Spark in Scala

  1. Load model.

    import scala.io.Source
    import org.pmml4s.model.Model
    import org.pmml4s.spark.ScoreModel
    
    // The main constructor accepts an object of org.pmml4s.model.Model
    val model = ScoreModel(Model(Source.fromURL(new java.net.URL("http://dmg.org/pmml/pmml_examples/KNIME_PMML_4.1_Examples/single_iris_dectree.xml"))))

    or

    import org.pmml4s.spark.ScoreModel
    
    // load model from those help methods, e.g. pathname, file object, a string, an array of bytes, or an input stream.
    val model = ScoreModel.fromFile("single_iris_dectree.xml")
  2. Call transform(dataset) to run a batch score against an input dataset.

    // The data is from http://dmg.org/pmml/pmml_examples/Iris.csv
    val df = spark.read.
      format("csv").
      options(Map("header" -> "true", "inferSchema" -> "true")).
      load("Iris.csv")
    
    val scoreDf = model.transform(df)
    scala> scoreDf.show(5)
    +------------+-----------+------------+-----------+-----------+---------------+-----------+-----------------------+---------------------------+--------------------------+-------+
    |sepal_length|sepal_width|petal_length|petal_width|      class|predicted_class|probability|probability_Iris-setosa|probability_Iris-versicolor|probability_Iris-virginica|node_id|
    +------------+-----------+------------+-----------+-----------+---------------+-----------+-----------------------+---------------------------+--------------------------+-------+
    |         5.1|        3.5|         1.4|        0.2|Iris-setosa|    Iris-setosa|        1.0|                    1.0|                        0.0|                       0.0|      1|
    |         4.9|        3.0|         1.4|        0.2|Iris-setosa|    Iris-setosa|        1.0|                    1.0|                        0.0|                       0.0|      1|
    |         4.7|        3.2|         1.3|        0.2|Iris-setosa|    Iris-setosa|        1.0|                    1.0|                        0.0|                       0.0|      1|
    |         4.6|        3.1|         1.5|        0.2|Iris-setosa|    Iris-setosa|        1.0|                    1.0|                        0.0|                       0.0|      1|
    |         5.0|        3.6|         1.4|        0.2|Iris-setosa|    Iris-setosa|        1.0|                    1.0|                        0.0|                       0.0|      1|
    +------------+-----------+------------+-----------+-----------+---------------+-----------+-----------------------+---------------------------+--------------------------+-------+
    only showing top 5 rows

Use PMML for Spark in Java

  1. Load model.

    import org.pmml4s.spark.ScoreModel;
    
    // load model from those help methods, e.g. pathname, file object, a string, an array of bytes, or an input stream.
    ScoreModel model = ScoreModel.fromFile("single_iris_dectree.xml");
  2. Call transform(dataset) to run a batch score against an input dataset.

    import org.apache.spark.sql.Dataset;
    
    // The data is from http://dmg.org/pmml/pmml_examples/Iris.csv
    Dataset<?> df = spark.read().
       format("csv").
       option("header", "true").
       option("inferSchema", "true").
       load("Iris.csv"); 
    
    Dataset<?> scoreDf = model.transform(df);
    scoreDf.show(5);

Use PMML in PySpark

See the PyPMML-Spark project. PyPMML-Spark is a Python PMML scoring library for PySpark as SparkML Transformer, it really is the Python API for PMML4s-Spark.

Use PMML in Scala or Java

See the PMML4S project. PMML4S is a PMML scoring library for Scala. It provides both Scala and Java Evaluator API for PMML.

Use PMML in Python

See the PyPMML project. PyPMML is a Python PMML scoring library, it really is the Python API for PMML4S.

Deploy PMML as REST API

See the AI-Serving project. AI-Serving is serving AI/ML models in the open standard formats PMML and ONNX with both HTTP (REST API) and gRPC endpoints.

Deploy and Manage AI/ML models at scale

See the DaaS system that deploys AI/ML models in production at scale on Kubernetes.

Support

If you have any questions about the PMML4S-Spark library, please open issues on this repository.

Feedback and contributions to the project, no matter what kind, are always very welcome.

License

PMML4S-Spark is licensed under APL 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].