This repository was archived by the owner on Sep 14, 2018. It is now read-only.
forked from matthiaskramm/mrscake
-
Notifications
You must be signed in to change notification settings - Fork 1
onlinemediagroup/mrscake
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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
About
data prediction library
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published