All Projects → richardstartin → Multi Matcher

richardstartin / Multi Matcher

Licence: apache-2.0
simple rules engine

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Multi Matcher

NN-scratch
Coding up a Neural Network Classifier from Scratch
Stars: ✭ 78 (-7.14%)
Mutual labels:  classifier, classification
classy
Super simple text classifier using Naive Bayes. Plug-and-play, no dependencies
Stars: ✭ 12 (-85.71%)
Mutual labels:  classifier, classification
Sytora
A sophisticated smart symptom search engine
Stars: ✭ 111 (+32.14%)
Mutual labels:  classification, classifier
Awesome Fraud Detection Papers
A curated list of data mining papers about fraud detection.
Stars: ✭ 843 (+903.57%)
Mutual labels:  classification, classifier
text2class
Multi-class text categorization using state-of-the-art pre-trained contextualized language models, e.g. BERT
Stars: ✭ 15 (-82.14%)
Mutual labels:  classifier, classification
ML4K-AI-Extension
Use machine learning in AppInventor, with easy training using text, images, or numbers through the Machine Learning for Kids website.
Stars: ✭ 18 (-78.57%)
Mutual labels:  classifier, classification
Keras transfer cifar10
Object classification with CIFAR-10 using transfer learning
Stars: ✭ 120 (+42.86%)
Mutual labels:  classification, classifier
dl-relu
Deep Learning using Rectified Linear Units (ReLU)
Stars: ✭ 20 (-76.19%)
Mutual labels:  classifier, classification
support-tickets-classification
This case study shows how to create a model for text analysis and classification and deploy it as a web service in Azure cloud in order to automatically classify support tickets. This project is a proof of concept made by Microsoft (Commercial Software Engineering team) in collaboration with Endava http://endava.com/en
Stars: ✭ 142 (+69.05%)
Mutual labels:  classifier, classification
Ml Classify Text Js
Machine learning based text classification in JavaScript using n-grams and cosine similarity
Stars: ✭ 38 (-54.76%)
Mutual labels:  classification, classifier
Metriculous
Measure and visualize machine learning model performance without the usual boilerplate.
Stars: ✭ 71 (-15.48%)
Mutual labels:  classification
Sporf
This is the implementation of Sparse Projection Oblique Randomer Forest
Stars: ✭ 70 (-16.67%)
Mutual labels:  classification
Phormatics
Using A.I. and computer vision to build a virtual personal fitness trainer. (Most Startup-Viable Hack - HackNYU2018)
Stars: ✭ 79 (-5.95%)
Mutual labels:  classification
Ashpy
TensorFlow 2.0 library for distributed training, evaluation, model selection, and fast prototyping.
Stars: ✭ 82 (-2.38%)
Mutual labels:  classification
Graph 2d cnn
Code and data for the paper 'Classifying Graphs as Images with Convolutional Neural Networks' (new title: 'Graph Classification with 2D Convolutional Neural Networks')
Stars: ✭ 67 (-20.24%)
Mutual labels:  classification
Machine Learning
My Attempt(s) In The World Of ML/DL....
Stars: ✭ 78 (-7.14%)
Mutual labels:  classification
Nlc Icd10 Classifier
A simple web app that shows how Watson's Natural Language Classifier (NLC) can classify ICD-10 code. The app is written in Python using the Flask framework and leverages the Watson Developer Cloud Python SDK
Stars: ✭ 66 (-21.43%)
Mutual labels:  classifier
Sru Deeplearning Workshop
دوره 12 ساعته یادگیری عمیق با چارچوب Keras
Stars: ✭ 66 (-21.43%)
Mutual labels:  classification
Weka Jruby
Machine Learning & Data Mining with JRuby
Stars: ✭ 64 (-23.81%)
Mutual labels:  classification
X Ray Classification
X-ray Images (Chest images) analysis and anomaly detection using Transfer learning with inception v2
Stars: ✭ 83 (-1.19%)
Mutual labels:  classification

multi-matcher

Build Status Coverage Status Maven Central License Javadoc Total alerts Language grade: Java

I have often needed to implement tedious classification logic in data processing projects. The requirements are often ambiguous to the extent that it would be difficult to implement them even in SQL, with aspects such as fallback and overlap. This logic often ends up expressed as large blocks of nested if statements which are hard to read or modify and perform poorly. This small project aims to make such classification logic easier, and improve performance too.

usage

Build a generic classification engine

    Classifier<Product, String> classifier = Classifier.<String, Product, String>builder(
                Schema.<String, Product, String>create()
                        .withAttribute("productType", Product::getProductType)
                        .withAttribute("issueDate", Product::getIssueDate, Comparator.naturalOrder().reversed())
                        .withAttribute("productName", Product::getProductName)
                        .withAttribute("availability", Product::getAvailability)
                        .withAttribute("discountedPrice", value -> 0.2 * value.getPrice())
                ).build(Arrays.asList(
                    MatchingConstraint.<String, String>named("rule1") 
                            .eq("productType", "silk")
                            .startsWith("productName", "luxury")
                            .gt("discountedPrice", 1000)
                            .priority(0)
                            .classification("EXPENSIVE_LUXURY_PRODUCTS")
                            .build(),
                    MatchingConstraint.<String, String>named("rule2")
                            .eq("productType", "caviar")
                            .gt("discountedPrice", 100)
                            .priority(1)
                            .classification("EXPENSIVE_LUXURY_PRODUCTS")
                            .build(),
                    MatchingConstraint.<String, String>anonymous()
                            .eq("productName", "baked beans")
                            .priority(2)
                            .classification("CHEAP_FOOD")
                            .build()
                )
            );

Classify

  Product p = getProduct();
  String classification = classifier.classification(p).orElse("UNCLASSIFIED");
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].