Coder Social home page Coder Social logo

diegoami / da_spamdetector_scikit_pmml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpmml/jpmml-evaluator-bootstrap

0.0 1.0 0.0 12.99 MB

Spam detector in Java using an externally created PMML file

License: GNU Affero General Public License v3.0

Java 86.68% R 9.01% Dockerfile 4.31%

da_spamdetector_scikit_pmml's Introduction

SPAM DETECTOR using PMML

This project uses the PMML Model generated created in http://github.com/diegoami/DA_spamdetector_scikit and verifies whether the result are the same

SET UP

Make sure you have Java 8 or higher installed and Maven

COMPILE

Execute mvn clean compile package

RUN locally

To verify the model, execute the following commands. If you have created spam_model.pmml and spam_out.csv in other directories, adapt the command line accordingly.

java -cp target/bootstrap-executable-1.0-SNAPSHOT.jar org.jpmml.evaluator.bootstrap.Main data/spam_model.pmml data/spam_out.csv
# java -cp target/bootstrap-executable-1.0-SNAPSHOT.jar org.jpmml.evaluator.bootstrap.Main <YOUR_DATA_DIRECTORY>/spam_model.pmml <YOUR_DATA_DIRECTORY>/spam_out.csv

The expected result is the following - same as in the original model created in Python in the repo http://github.com/diegoami/DA_spamdetector_scikit

Accuracy : 0.9937185929648241
Confusion Matrix: (4822, 32, 3, 715)

EXECUTE IN DOCKER

The executable jar is already available in the root directory, therefore it can be used to create a docker image. YOUR_DATA_DIRECTORY is where you put the files you created from http://github.com/diegoami/DA_spamdetector_scikit

docker build -t spam_detector_pmml . 
docker run  -v $(pwd)/data:/opt/data spam_detector_pmml
# docker run  -v <YOUR_DATA_DIRECTORY>:/opt/data spam_detector_pmml

da_spamdetector_scikit_pmml's People

Contributors

vruusmann avatar diegoami avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.