Project

mirlo

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Machine Learning experiments
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

Mirlo

Some Machine Learning algorithms implemented in Ruby.

Currently implemented:

  • Perceptron
  • Multilayer Perceptron. Batch update of neuron weights with momentum.

Example

mlp = Mirlo::ANN.build do
  input_layer  2
  hidden_layer 3
  output_layer 1
end
# => #<Mirlo::MultilayerPerceptron:0x007fa0e997eff0 ...>

data_set = Mirlo::XORDataSet.new
# => #<Mirlo::XORDataSet:0x007fa0e9995430 ...>

mlp.train_until(data_set, max_error: 0.0)

mlp.classify([0,0])
# => [0]

mlp.classify([1,0])
# => [1]

mlp.classify([0,1])
# => [1]

mlp.classify([1,1])
# => [0]