wGmdh.jGmdh.hybrid
Class ErrorPropagatingModel
java.lang.Object
wGmdh.jGmdh.oldskul.Node
wGmdh.jGmdh.oldskul.Model
wGmdh.jGmdh.oldskul.TwoInputModel
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 classes/interfaces inherited from class wGmdh.jGmdh.oldskul.Node |
Node.Visited |
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 goaltrainingData
- 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 arrayfold
- 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: