All Projects → asafschers → scoruby

asafschers / scoruby

Licence: MIT license
Ruby Scoring API for PMML

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to scoruby

Machine-Learning-Models
In This repository I made some simple to complex methods in machine learning. Here I try to build template style code.
Stars: ✭ 30 (-56.52%)
Mutual labels:  random-forest, naive-bayes, decision-tree
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+3084.06%)
Mutual labels:  random-forest, naive-bayes, classification
H2o 3
H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
Stars: ✭ 5,656 (+8097.1%)
Mutual labels:  random-forest, naive-bayes, gbm
decision-trees-for-ml
Building Decision Trees From Scratch In Python
Stars: ✭ 61 (-11.59%)
Mutual labels:  random-forest, gbm, decision-tree
Awesome Fraud Detection Papers
A curated list of data mining papers about fraud detection.
Stars: ✭ 843 (+1121.74%)
Mutual labels:  random-forest, classification
Jsmlt
🏭 JavaScript Machine Learning Toolkit
Stars: ✭ 22 (-68.12%)
Mutual labels:  random-forest, classification
Handwritten Digit Recognition Using Deep Learning
Handwritten Digit Recognition using Machine Learning and Deep Learning
Stars: ✭ 127 (+84.06%)
Mutual labels:  random-forest, classification
Orange3
🍊 📊 💡 Orange: Interactive data analysis
Stars: ✭ 3,152 (+4468.12%)
Mutual labels:  random-forest, classification
Amazon-Fine-Food-Review
Machine learning algorithm such as KNN,Naive Bayes,Logistic Regression,SVM,Decision Trees,Random Forest,k means and Truncated SVD on amazon fine food review
Stars: ✭ 28 (-59.42%)
Mutual labels:  random-forest, naive-bayes
Awesome Decision Tree Papers
A collection of research papers on decision, classification and regression trees with implementations.
Stars: ✭ 1,908 (+2665.22%)
Mutual labels:  random-forest, decision-tree
Machine Learning With Ruby
Curated list: Resources for machine learning in Ruby
Stars: ✭ 1,693 (+2353.62%)
Mutual labels:  ruby-gem, rubyml
STOCK-RETURN-PREDICTION-USING-KNN-SVM-GUASSIAN-PROCESS-ADABOOST-TREE-REGRESSION-AND-QDA
Forecast stock prices using machine learning approach. A time series analysis. Employ the Use of Predictive Modeling in Machine Learning to Forecast Stock Return. Approach Used by Hedge Funds to Select Tradeable Stocks
Stars: ✭ 94 (+36.23%)
Mutual labels:  random-forest, decision-tree
MachineLearningSeries
Vídeos e códigos do Universo Discreto ensinando o fundamental de Machine Learning em Python. Para mais detalhes, acompanhar a playlist listada.
Stars: ✭ 20 (-71.01%)
Mutual labels:  random-forest, classification
Sporf
This is the implementation of Sparse Projection Oblique Randomer Forest
Stars: ✭ 70 (+1.45%)
Mutual labels:  random-forest, classification
AdaptiveRandomForest
Repository for the AdaptiveRandomForest algorithm implemented in MOA 2016-04
Stars: ✭ 28 (-59.42%)
Mutual labels:  random-forest, classification
AIML-Projects
Projects I completed as a part of Great Learning's PGP - Artificial Intelligence and Machine Learning
Stars: ✭ 85 (+23.19%)
Mutual labels:  random-forest, gradient-boosting-classifier
grasp
Essential NLP & ML, short & fast pure Python code
Stars: ✭ 58 (-15.94%)
Mutual labels:  naive-bayes, decision-tree
supervised-machine-learning
This repo contains regression and classification projects. Examples: development of predictive models for comments on social media websites; building classifiers to predict outcomes in sports competitions; churn analysis; prediction of clicks on online ads; analysis of the opioids crisis and an analysis of retail store expansion strategies using…
Stars: ✭ 34 (-50.72%)
Mutual labels:  random-forest, classification
SentimentAnalysis
(BOW, TF-IDF, Word2Vec, BERT) Word Embeddings + (SVM, Naive Bayes, Decision Tree, Random Forest) Base Classifiers + Pre-trained BERT on Tensorflow Hub + 1-D CNN and Bi-Directional LSTM on IMDB Movie Reviews Dataset
Stars: ✭ 40 (-42.03%)
Mutual labels:  random-forest, decision-tree
Heart disease prediction
Heart Disease prediction using 5 algorithms
Stars: ✭ 43 (-37.68%)
Mutual labels:  random-forest, naive-bayes

Coverage Status Gem Version Build Status

Scoruby

Ruby scoring API for Predictive Model Markup Language (PMML).

Currently supports -

  • Decision Tree
  • Naive Bayes
  • Logistic Regression
  • Random Forest
  • Gradient Boosted Trees

Will be happy to implement new models by demand, or assist with any other issue.

Contact me here or at [email protected].

Tutorial - Deploy Machine Learning Models from R Research to Ruby Production with PMML

Installation

Add this line to your application's Gemfile:

gem 'scoruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install scoruby

Usage

Naive Bayes

naive_bayes = Scoruby.load_model 'naive_bayes.pmml'
features = { f1: v1 , ... } 
naive_bayes.lvalues(features)
naive_bayes.score(features, 'l1')

Logistic Regression

logistic_regression = Scoruby.load_model 'logistic_regression.pmml'
features = { f1: v1 , ... } 
logistic_regression.score(features)

Decision Tree

decision_tree = Scoruby.load_model 'decision_tree.pmml'
features = { f1 : v1, ... } 
decision_tree.decide(features)

=> #<Decision:0x007fc232384180 @score="0", @score_distribution={"0"=>"0.999615579933873", "1"=>"0.000384420066126561"}>

Random Forest

Generate PMML - R

random_forest = Scoruby.load_model 'titanic_rf.pmml'
features =  {
        Sex: 'male',
        Parch: 0,
        Age: 30,
        Fare: 9.6875,
        Pclass: 2,
        SibSp: 0,
        Embarked: 'Q'       
    }

random_forest.score(features)

=> {:label=>"0", :score=>0.882}

random_forest.decisions_count(features)

=> {"0"=>441, "1"=>59}

Gradient Boosted model

Generate PMML - R

gbm = Scoruby.load_model 'gbm.pmml'

features =  {
        Sex: 'male',
        Parch: 0,
        Age: 30,
        Fare: 9.6875,
        Pclass: 2,
        SibSp: 0,
        Embarked: 'Q'       
    }

gbm.score(features)

=> 0.3652639329522468

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/asafschers/scoruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

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].