com.rapidminer.operator.learner.functions.neuralnet
Class NeuralNetLearner

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.learner.AbstractLearner
          extended by com.rapidminer.operator.learner.functions.neuralnet.NeuralNetLearner
All Implemented Interfaces:
ConfigurationListener, PreviewListener, Learner, ParameterHandler, LoggingHandler, java.util.EventListener, org.joone.engine.NeuralNetListener

public class NeuralNetLearner
extends AbstractLearner
implements org.joone.engine.NeuralNetListener

This operator learns a model by means of a feed-forward neural network. The learning is done via backpropagation. The user can define the structure of the neural network with the parameter list "hidden_layer_types". Each list entry describes a new hidden layer. The key of each entry must correspond to the layer type which must be one out of

The key of each entry must be a number defining the size of the hidden layer. A size value of -1 or 0 indicates that the layer size should be calculated from the number of attributes of the input example set. In this case, the layer size will be set to (number of attributes + number of classes) / 2 + 1.

If the user does not specify any hidden layers, a default hidden layer with sigmoid type and size (number of attributes + number of classes) / 2 + 1 will be created and added to the net.

The type of the input nodes is sigmoid. The type of the output node is sigmoid is the learning data describes a classification task and linear for numerical regression tasks.

Author:
Ingo Mierswa
Keywords:
Neural Net

Field Summary
static java.lang.String PARAMETER_DEFAULT_HIDDEN_LAYER_SIZE
          The parameter name for "The default size of hidden layers.
static java.lang.String PARAMETER_DEFAULT_HIDDEN_LAYER_TYPE
          The parameter name for "The default layer type for the hidden layers.
static java.lang.String PARAMETER_DEFAULT_NUMBER_OF_HIDDEN_LAYERS
          The parameter name for "The number of hidden layers.
static java.lang.String PARAMETER_ERROR_EPSILON
          The parameter name for "The optimization is stopped if the training error gets below this epsilon value.
static java.lang.String PARAMETER_HIDDEN_LAYER_TYPES
          The parameter name for "Describes the name, the size, and the type of all hidden layers"
static java.lang.String PARAMETER_INPUT_LAYER_TYPE
          The parameter name for "The default layer type for the input layers.
static java.lang.String PARAMETER_LEARNING_RATE
          The parameter name for "The learning rate determines by how much we change the weights at each step.
static java.lang.String PARAMETER_MOMENTUM
          The parameter name for "The momentum simply adds a fraction of the previous weight update to the current one (prevent local maxima and smoothes optimization directions).
static java.lang.String PARAMETER_OUTPUT_LAYER_TYPE
          The parameter name for "The default layer type for the output layers.
static java.lang.String PARAMETER_TRAINING_CYCLES
          The parameter name for "The number of training cycles used for the neural network training.
 
Fields inherited from class com.rapidminer.operator.learner.AbstractLearner
PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN
 
Constructor Summary
NeuralNetLearner(OperatorDescription description)
          Creates a new Neural Network learner.
 
Method Summary
 void cicleTerminated(org.joone.engine.NeuralNetEvent e)
           
 void errorChanged(org.joone.engine.NeuralNetEvent e)
           
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 Model learn(ExampleSet exampleSet)
          Learns and returns a model.
 void netStarted(org.joone.engine.NeuralNetEvent e)
           
 void netStopped(org.joone.engine.NeuralNetEvent e)
           
 void netStoppedError(org.joone.engine.NeuralNetEvent e, java.lang.String error)
           
 boolean supportsCapability(LearnerCapability lc)
          Returns true for all types of attributes and numerical and binominal labels.
 void train(ExampleSet exampleSet)
           
 
Methods inherited from class com.rapidminer.operator.learner.AbstractLearner
apply, getEstimatedPerformance, getInputClasses, getInputDescription, getOptimizationPerformance, getOutputClasses, getWeights, onlyWarnForNonSufficientCapabilities, shouldCalculateWeights, shouldDeliverOptimizationPerformance, shouldEstimatePerformance
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkDeprecations, checkForStop, checkIO, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInnerOperatorsXML, getInput, getInput, getInput, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getProcess, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, performAdditionalChecks, processFinished, processStarts, register, registerOperator, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, unregisterOperator, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.learner.Learner
getName
 

Field Detail

PARAMETER_INPUT_LAYER_TYPE

public static final java.lang.String PARAMETER_INPUT_LAYER_TYPE
The parameter name for "The default layer type for the input layers."

See Also:
Constant Field Values

PARAMETER_OUTPUT_LAYER_TYPE

public static final java.lang.String PARAMETER_OUTPUT_LAYER_TYPE
The parameter name for "The default layer type for the output layers."

See Also:
Constant Field Values

PARAMETER_DEFAULT_NUMBER_OF_HIDDEN_LAYERS

public static final java.lang.String PARAMETER_DEFAULT_NUMBER_OF_HIDDEN_LAYERS
The parameter name for "The number of hidden layers. Only used if no layers are defined by the list hidden_layer_types."

See Also:
Constant Field Values

PARAMETER_DEFAULT_HIDDEN_LAYER_SIZE

public static final java.lang.String PARAMETER_DEFAULT_HIDDEN_LAYER_SIZE
The parameter name for "The default size of hidden layers. Only used if no layers are defined by the list hidden_layer_types. -1 means size (number of attributes + number of classes) / 2"

See Also:
Constant Field Values

PARAMETER_DEFAULT_HIDDEN_LAYER_TYPE

public static final java.lang.String PARAMETER_DEFAULT_HIDDEN_LAYER_TYPE
The parameter name for "The default layer type for the hidden layers. Only used if the parameter list hidden_layer_types is not defined."

See Also:
Constant Field Values

PARAMETER_HIDDEN_LAYER_TYPES

public static final java.lang.String PARAMETER_HIDDEN_LAYER_TYPES
The parameter name for "Describes the name, the size, and the type of all hidden layers"

See Also:
Constant Field Values

PARAMETER_TRAINING_CYCLES

public static final java.lang.String PARAMETER_TRAINING_CYCLES
The parameter name for "The number of training cycles used for the neural network training."

See Also:
Constant Field Values

PARAMETER_LEARNING_RATE

public static final java.lang.String PARAMETER_LEARNING_RATE
The parameter name for "The learning rate determines by how much we change the weights at each step."

See Also:
Constant Field Values

PARAMETER_MOMENTUM

public static final java.lang.String PARAMETER_MOMENTUM
The parameter name for "The momentum simply adds a fraction of the previous weight update to the current one (prevent local maxima and smoothes optimization directions)."

See Also:
Constant Field Values

PARAMETER_ERROR_EPSILON

public static final java.lang.String PARAMETER_ERROR_EPSILON
The parameter name for "The optimization is stopped if the training error gets below this epsilon value."

See Also:
Constant Field Values
Constructor Detail

NeuralNetLearner

public NeuralNetLearner(OperatorDescription description)
Creates a new Neural Network learner.

Method Detail

learn

public Model learn(ExampleSet exampleSet)
            throws OperatorException
Learns and returns a model.

Specified by:
learn in interface Learner
Throws:
OperatorException

train

public void train(ExampleSet exampleSet)
           throws UndefinedParameterError
Throws:
UndefinedParameterError

cicleTerminated

public void cicleTerminated(org.joone.engine.NeuralNetEvent e)
Specified by:
cicleTerminated in interface org.joone.engine.NeuralNetListener

errorChanged

public void errorChanged(org.joone.engine.NeuralNetEvent e)
Specified by:
errorChanged in interface org.joone.engine.NeuralNetListener

netStarted

public void netStarted(org.joone.engine.NeuralNetEvent e)
Specified by:
netStarted in interface org.joone.engine.NeuralNetListener

netStopped

public void netStopped(org.joone.engine.NeuralNetEvent e)
Specified by:
netStopped in interface org.joone.engine.NeuralNetListener

netStoppedError

public void netStoppedError(org.joone.engine.NeuralNetEvent e,
                            java.lang.String error)
Specified by:
netStoppedError in interface org.joone.engine.NeuralNetListener

supportsCapability

public boolean supportsCapability(LearnerCapability lc)
Returns true for all types of attributes and numerical and binominal labels.

Specified by:
supportsCapability in interface Learner

getParameterTypes

public java.util.List<ParameterType> getParameterTypes()
Description copied from class: Operator
Returns a list of ParameterTypes describing the parameters of this operator. The default implementation returns an empty list if no input objects can be retained and special parameters for those input objects which can be prevented from being consumed.

Specified by:
getParameterTypes in interface ParameterHandler
Overrides:
getParameterTypes in class Operator


Copyright © 2001-2009 by Rapid-I