Class Ai4r::Classifiers::MultilayerPerceptron
In: lib/ai4r/classifiers/multilayer_perceptron.rb
Parent: Classifier

Introduction

The idea behind the MultilayerPerceptron classifier is to train a Multilayer Perceptron neural network with the provided examples, and predict the class for new data items.

Parameters

Use class method get_parameters_info to obtain details on the algorithm parameters. Use set_parameters to set values for this parameters. See Parameterizable module documentation.

  • :network_class => Neural network implementation class. By default: Ai4r::NeuralNetwork::Backpropagation.
  • :network_parameters => Parameters to be forwarded to the back end neural ntework.
  • :hidden_layers => Hidden layer structure. E.g. [8, 6] will generate 2 hidden layers with 8 and 6 neurons each. By default []
  • :training_iterations => How many times the training should be repeated. By default: 1000.

:active_node_value => Default: 1 :inactive_node_value => Default: 1

Methods

Attributes

class_value  [R] 
data_set  [R] 
domains  [R] 
network  [R] 

Public Class methods

Public Instance methods

Build a new MultilayerPerceptron classifier. You must provide a DataSet instance as parameter. The last attribute of each item is considered as the item class.

You can evaluate new data, predicting its class. e.g.

  classifier.eval(['New York',  '<30', 'F'])  # => 'Y'

Multilayer Perceptron Classifiers cannot generate human-readable rules.

Protected Instance methods

[Validate]