wGmdh.jGmdh.hybrid
Class ErrorPropagatingModel

java.lang.Object
  extended by wGmdh.jGmdh.oldskul.Node
      extended by wGmdh.jGmdh.oldskul.Model
          extended by wGmdh.jGmdh.oldskul.TwoInputModel
              extended by wGmdh.jGmdh.hybrid.ErrorPropagatingModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Node>

public class ErrorPropagatingModel
extends TwoInputModel

A two-input building block of additive GMDH

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class wGmdh.jGmdh.oldskul.TwoInputModel
TwoInputModel.VisitedHt
 
Nested classes/interfaces inherited from class wGmdh.jGmdh.oldskul.Model
Model.Summand
 
Nested classes/interfaces inherited from class wGmdh.jGmdh.oldskul.Node
Node.Visited
 
Field Summary
 
Fields inherited from class wGmdh.jGmdh.oldskul.TwoInputModel
visitinfo
 
Fields inherited from class wGmdh.jGmdh.oldskul.Model
coeffs, errorMeasure, links, sortedLinkIds, structureSelectionCriterion
 
Fields inherited from class wGmdh.jGmdh.oldskul.Node
graphics, trainSetOutput, validationSetOutput, visited
 
Constructor Summary
ErrorPropagatingModel(double[] regressionGoals, Performance selectionCriterion, Performance errorMeasure, Node... links)
           
ErrorPropagatingModel(Node... links)
           
ErrorPropagatingModel(Performance selectionCriterion, Performance errorMeasure, Node... inputs)
          Sets up performance criteria and links.
ErrorPropagatingModel(Performance selectionCriterion, Performance errorMeasure, Node inputL, Node inputR)
          Sets up performance criteria and links.
 
Method Summary
protected  double[] coeffsFromData(double[] regressTo, double[][] trainingData)
          Fits the coefficients to residual of the existing fit.
 double networkOutput(double[] inputs, int fold)
          Calculate total output of this GMDH model, recursively, given an instance.
 double networkOutputNoFlags(double[] inputs, int fold)
          Invoked by networkOutput.
 
Methods inherited from class wGmdh.jGmdh.oldskul.TwoInputModel
localOuputOnArray, localOutput
 
Methods inherited from class wGmdh.jGmdh.oldskul.Model
coeffsAndErrors, coeffsAndErrors, coeffsAndErrors, collectTrainingData, collectValidationData, generateSummands, getCoeffs, getErrorMeasure, getErrorStructureLearningSet, getErrorStructureValidationSet, getSelectionCriterion, getStructureLearningGoals, getStructureLearningGoals, getStructureLearningInstances, getStructureLearningInstances, getStructureValidationGoals, getStructureValidationGoals, getStructureValidationInstances, getStructureValidationInstances, noLinks, setErrorMeasure, setSelectionCriterion
 
Methods inherited from class wGmdh.jGmdh.oldskul.Node
compareTo, getGlobalIdentifier, getIdentifier, getNrFolds, InitializeGraphics, setGlobalIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorPropagatingModel

public ErrorPropagatingModel(Node... links)
Parameters:
links -

ErrorPropagatingModel

public ErrorPropagatingModel(Performance selectionCriterion,
                             Performance errorMeasure,
                             Node inputL,
                             Node inputR)
                      throws TooBig,
                             ExpressionEqualToZero,
                             TooSmall
Sets up performance criteria and links. Does not determine coefficients and measure quality of fit.

Parameters:
selectionCriterion -
errorMeasure -
inputL -
inputR -
Throws:
jGMDH.exceptions.TooBig
jGMDH.exceptions.ExpressionEqualToZero
jGMDH.exceptions.TooSmall
TooBig
ExpressionEqualToZero
TooSmall

ErrorPropagatingModel

public ErrorPropagatingModel(double[] regressionGoals,
                             Performance selectionCriterion,
                             Performance errorMeasure,
                             Node... links)
                      throws TooBig,
                             ExpressionEqualToZero,
                             TooSmall
Parameters:
regressionGoals -
selectionCriterion -
errorMeasure -
links -
Throws:
jGMDH.exceptions.TooBig
jGMDH.exceptions.ExpressionEqualToZero
jGMDH.exceptions.TooSmall
TooBig
ExpressionEqualToZero
TooSmall

ErrorPropagatingModel

public ErrorPropagatingModel(Performance selectionCriterion,
                             Performance errorMeasure,
                             Node... inputs)
                      throws TooBig,
                             ExpressionEqualToZero,
                             TooSmall
Sets up performance criteria and links. Does not determine coefficients and measure quality of fit.

Parameters:
selectionCriterion -
errorMeasure -
inputs -
Throws:
TooBig
ExpressionEqualToZero
TooSmall
Method Detail

coeffsFromData

protected double[] coeffsFromData(double[] regressTo,
                                  double[][] trainingData)
                           throws TooBig
Fits the coefficients to residual of the existing fit.

Overrides:
coeffsFromData in class TwoInputModel
Parameters:
regressTo - regression goal
trainingData - node inputs
Returns:
Throws:
TooBig

networkOutput

public double networkOutput(double[] inputs,
                            int fold)
Calculate total output of this GMDH model, recursively, given an instance. Note: Models that share the same layer can be have their outputs calculated in parallel. Procesing of an array of inputs can also be optimized. (Athough, Weka doesn't have a classifyInstance(Instance[]), only classifyInstance(Instance)).

Overrides:
networkOutput in class TwoInputModel
Parameters:
inputs - instance data organized as an array
fold - index of fold. if there are no multiple folds, pass 0
Returns:

networkOutputNoFlags

public double networkOutputNoFlags(double[] inputs,
                                   int fold)
Invoked by networkOutput.

Overrides:
networkOutputNoFlags in class TwoInputModel
Parameters:
inputs -
fold -
Returns: