Class: ML::Learner::AdaptivePerceptronLearner

Inherits:
PerceptronLearner show all
Defined in:
lib/method/adaptive_perceptron.rb

Overview

Implementation of Adaptive Perceptron Learning Algorithm

Instance Attribute Summary

Attributes included from LinearToolbox

#current_vector

Instance Method Summary collapse

Methods inherited from PerceptronLearner

#train!

Methods included from LinearToolbox

#line, #predict

Methods included from Toolbox

#classify_error, #predict

Constructor Details

#initialize(dim, eta = 0.1) ⇒ AdaptivePerceptronLearner

Initialize an adaptive perceptron learner

Parameters:

  • dim (Integer)

    the number of dimension

  • the (Float)

    eta parameter



11
12
13
14
# File 'lib/method/adaptive_perceptron.rb', line 11

def initialize dim, eta = 0.1
  super(dim)
  @eta = eta
end