Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
data prediction library
branch: master

This branch is 183 commits behind matthiaskramm:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
lib
.gitignore
Makefile
README
ast.c
ast.h
ast_transforms.c
ast_transforms.h
autoupdate.py
build_model.py
codegen.c
codegen.h
codegen_c.c
codegen_js.c
codegen_python.c
codegen_ruby.c
config.h
constant.c
constant.h
cvtools.cpp
cvtools.h
dataset.c
dataset.h
dict.c
dict.h
easy_ast.h
environment.c
environment.h
io.c
io.h
job.c
job.h
list.c
list.h
model.c
model_cv_ann.cpp
model_cv_dtree.cpp
model_cv_linear.cpp
model_cv_svm.cpp
model_perceptron.c
model_select.c
model_select.h
mrscake.h
mrscake.py.c
mrscake.rb.c
multimodel.cpp
net.c
net.h
python_interpreter.c
serialize.c
serialize.h
server.c
settings.c
settings.h
stringpool.c
stringpool.h
test_ast.c
test_model.c
test_python_module.py
test_ruby_module.rb
test_server.c
test_subset.c
var_selection.c
var_selection.h
varselect_cv_dtree.cpp

README

mrscake (read: "Mrs. Cake") is a model selection algorithm built 
on top of machine learning algorithms from OpenCV.

Compile it using
    make
    make install
.
(Potentially tweak the Makefile first)

It has a Ruby and a Python interface.

Python:
-------

import mrscake
data = mrscake.DataSet()
data.add(["a", 1.0, "blue"], output="yes")
data.add(["a", 3.0, "red"], output="yes")
data.add(["b", 2.0, "red"], output="no")
data.add(["b", 3.0, "blue"], output="no")
data.add(["a", 5.0, "blue"], output="yes")
data.add(["b", 4.0, "blue"], output="yes")
model = data.train()

result = model.predict(["a", 2.0, "red"])

code = model.generate_code("python") # or: ruby, javascript, c

Ruby:
-----

require 'mrscake'
data = MrsCake::DataSet.new
data.add([:a, 1.0, :blue], :yes)
data.add([:a, 3.0, :red], :yes)
data.add([:b, 2.0, :red], :no)
data.add([:b, 3.0, :blue], :no)
data.add([:a, 5.0, :blue], :yes)
data.add([:b, 4.0, :blue], :yes)
model = data.train()
model.print

result = model.predict([:a, 2.0, :red])

code = model.generate_code("ruby") # or: ruby, javascript, c

Something went wrong with that request. Please try again.