All Projects → corels → pycorels

corels / pycorels

Licence: GPL-3.0 License
Public home of pycorels, the python binding to CORELS

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to pycorels

zoofs
zoofs is a python library for performing feature selection using a variety of nature-inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics-based to Evolutionary. It's easy to use , flexible and powerful tool to reduce your feature size.
Stars: ✭ 142 (+178.43%)
Mutual labels:  machine-learning-algorithms
oxygenjs
This a JavaScript Library for the Numerical Javascript and Machine Learning
Stars: ✭ 13 (-74.51%)
Mutual labels:  machine-learning-algorithms
Machine-Learning
A repo to explain algorithm in machine learning with CHINESE
Stars: ✭ 24 (-52.94%)
Mutual labels:  machine-learning-algorithms
ML-ProjectKart
🙌Kart of 210+ projects based on machine learning, deep learning, computer vision, natural language processing and all. Show your support by ✨ this repository.
Stars: ✭ 162 (+217.65%)
Mutual labels:  machine-learning-algorithms
R-programming-books-for-data-science
No description or website provided.
Stars: ✭ 32 (-37.25%)
Mutual labels:  machine-learning-algorithms
Data-Scientist-In-Python
This repository contains notes and projects of Data scientist track from dataquest course work.
Stars: ✭ 23 (-54.9%)
Mutual labels:  machine-learning-algorithms
mljar-examples
Examples how MLJAR can be used
Stars: ✭ 42 (-17.65%)
Mutual labels:  machine-learning-algorithms
DA Tutorial
This is a 'hands-on' tutorial for the RIKEN International School on Data Assimilation (RISDA2018).
Stars: ✭ 23 (-54.9%)
Mutual labels:  machine-learning-algorithms
spark-transformers
Spark-Transformers: Library for exporting Apache Spark MLLIB models to use them in any Java application with no other dependencies.
Stars: ✭ 39 (-23.53%)
Mutual labels:  machine-learning-algorithms
genie
Genie: A Fast and Robust Hierarchical Clustering Algorithm (this R package has now been superseded by genieclust)
Stars: ✭ 21 (-58.82%)
Mutual labels:  machine-learning-algorithms
NoML
A notebook for machine learning interview
Stars: ✭ 54 (+5.88%)
Mutual labels:  machine-learning-algorithms
Upside-Down-Reinforcement-Learning
Upside-Down Reinforcement Learning (⅂ꓤ) implementation in PyTorch. Based on the paper published by Jürgen Schmidhuber.
Stars: ✭ 64 (+25.49%)
Mutual labels:  machine-learning-algorithms
Machine-learning-implement
Teach you how to implement machine learning algorithms
Stars: ✭ 37 (-27.45%)
Mutual labels:  machine-learning-algorithms
taller SparkR
Taller SparkR para las Jornadas de Usuarios de R
Stars: ✭ 12 (-76.47%)
Mutual labels:  machine-learning-algorithms
neptune-examples
Examples of using Neptune to keep track of your experiments (maintenance only).
Stars: ✭ 22 (-56.86%)
Mutual labels:  machine-learning-algorithms
spectral-clustering.matlab
An intuitive implementation of spectral clustering on matlab
Stars: ✭ 12 (-76.47%)
Mutual labels:  machine-learning-algorithms
Fake-News-Detection-Project
Fake News Detection Final Year College Project with Project Report, PPT, Code, Research Paper and Documents.
Stars: ✭ 16 (-68.63%)
Mutual labels:  machine-learning-algorithms
themis-ml
A library that implements fairness-aware machine learning algorithms
Stars: ✭ 93 (+82.35%)
Mutual labels:  machine-learning-algorithms
SWBlog
machine learning practitioner, android and python
Stars: ✭ 33 (-35.29%)
Mutual labels:  machine-learning-algorithms
Python-TensorFlow-WebApp
Emerging Technologies Project - 4th Year 2017
Stars: ✭ 16 (-68.63%)
Mutual labels:  machine-learning-algorithms

Pycorels

Build Status Documentation Status

Welcome to the python binding of the Certifiably Optimal RulE ListS (CORELS) algorithm!

Overview

CORELS (Certifiably Optimal RulE ListS) is a custom discrete optimization technique for building rule lists over a categorical feature space. Using algorithmic bounds and efficient data structures, our approach produces optimal rule lists on practical problems in seconds.

The CORELS pipeline is simple. Given a dataset matrix of size n_samples x n_features and a labels vector of size n_samples, it will compute a rulelist (similar to a series of if-then statements) to predict the labels with the highest accuracy.

Here's an example: Whoops! The image failed to load

More information about the algorithm can be found here

Dependencies

CORELS uses Python, Numpy, GMP. GMP (GNU Multiple Precision library) is not required, but it is highly recommended, as it improves performance. If it is not installed, CORELS will run slower.

Installation

CORELS exists on PyPI, and can be downloaded with pip install corels

To install from this repo, simply run pip install . or python setup.py install from the corels/ directory.

Here are some detailed examples of how to install all the dependencies needed, followed by corels itself:

Ubuntu

sudo apt install libgmp-dev
pip install corels

Mac

# Install g++ and gmp
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install g++ gmp

pip install corels

Windows

Note: Python 2 is currently NOT supported on Windows.

pip install corels

Troubleshooting

  • If you come across an error saying Python version >=3.5 is required, try running pip install numpy before again running pip install corels.
  • If pip does not successfully install corels, try using pip3

Documentation

The docs for this package are hosted on here: https://pycorels.readthedocs.io/

Tests

After installing corels, run pytest (you may have to install it with pip install pytest first) from the tests/ folder, where the tests are located.

Examples

Large dataset, loaded from this file

from corels import *

# Load the dataset
X, y, _, _ = load_from_csv("data/compas.csv")

# Create the model, with 10000 as the maximum number of iterations 
c = CorelsClassifier(n_iter=10000)

# Fit, and score the model on the training set
a = c.fit(X, y).score(X, y)

# Print the model's accuracy on the training set
print(a)

Toy dataset (See picture example above)

from corels import CorelsClassifier

# ["loud", "samples"] is the most verbose setting possible
C = CorelsClassifier(max_card=2, c=0.0, verbosity=["loud", "samples"])

# 4 samples, 3 features
X = [[1, 0, 1], [0, 0, 0], [1, 1, 0], [0, 1, 0]]
y = [1, 0, 0, 1]
# Feature names
features = ["Mac User", "Likes Pie", "Age < 20"]

# Fit the model
C.fit(X, y, features=features, prediction_name="Has a dirty computer")

# Print the resulting rulelist
print(C.rl())

# Predict on the training set
print(C.predict(X))

More examples are in the examples/ directory

Questions?

Email the maintainer at: [email protected]

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