|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wGmdh.jGmdh.oldskul.Node wGmdh.jGmdh.oldskul.Model
public abstract class Model
Contains basic functionality of a GMDH model, such as connectivity information and obtaining data at the inputs. generateSummands and the Summand class are strictly related to the typical polynomial output function. If you want to customize the GMDH node (its output function or whatever), inherit from this class. TODO: Model could extend classifier directly? We could use Evaluation then and all related weka built-in functions
Nested Class Summary | |
---|---|
class |
Model.Summand
Summand in the GMDH polynomial: coefficient*variable1*variable2*... |
Nested classes/interfaces inherited from class wGmdh.jGmdh.oldskul.Node |
---|
Node.Visited |
Field Summary | |
---|---|
protected java.util.ArrayList<double[]> |
coeffs
|
protected Performance |
errorMeasure
|
java.util.ArrayList<Node> |
links
|
protected long[] |
sortedLinkIds
|
protected Performance |
structureSelectionCriterion
|
Fields inherited from class wGmdh.jGmdh.oldskul.Node |
---|
graphics, trainSetOutput, validationSetOutput, visited |
Constructor Summary | |
---|---|
Model()
|
|
Model(java.util.ArrayList<double[]> regressionGoals,
java.util.ArrayList<double[]> validationGoals,
Performance selectionCriterion,
Performance errorMeasure,
java.util.ArrayList<Node> links)
Deprecated. |
|
Model(java.util.ArrayList<double[]> regressionGoals,
java.util.ArrayList<double[]> validationGoals,
Performance selectionCriterion,
Performance errorMeasure,
Node... links)
Deprecated. |
|
Model(java.util.ArrayList<Node> links)
|
|
Model(DatasetHandlerSupervised handler,
Performance selectionCriterion,
Performance errorMeasure,
java.util.ArrayList<Node> links)
|
|
Model(double[] regressionGoals,
Performance selectionCriterion,
Performance errorMeasure,
Node... links)
Deprecated. |
|
Model(Node... links)
|
|
Model(Performance selectionCriterion,
Performance errorMeasure,
Node... links)
No regression or model evaluation takes place in this constructor. |
Method Summary | |
---|---|
void |
coeffsAndErrors(DatasetHandlerSupervised handler)
Folds dataSetToFold. |
void |
coeffsAndErrors(weka.core.Instances dataset,
double trainPercentage)
Deprecated. |
void |
coeffsAndErrors(weka.core.Instances datasetToFold,
int numFolds)
Deprecated. |
protected abstract double[] |
coeffsFromData(double[] regressTo,
double[][] trainingData)
Obtains coefficients by regression. |
double[][] |
collectTrainingData(int fold)
Deprecated. |
double[][] |
collectValidationData(int fold)
Deprecated. |
java.util.ArrayList<Model.Summand> |
generateSummands(double[] coefficients)
i.e. model has following form: P10 = a0 + a1*P1 + a2*P2 + a3*P3 + a4*P1*P1 + a5*P1*P2 + a6*P1*P3 + a7*P2*P2 + a8*P2*P3 + a9*P3*P3, method would return [ [a0, [null]], [a1,[P1]], [a2,[P2]], [a3,[P3]], [a4,[P1,P1]], [a5,[P1,P2]], ...] |
java.util.ArrayList<double[]> |
getCoeffs()
|
Performance |
getErrorMeasure()
|
double |
getErrorStructureLearningSet()
|
double |
getErrorStructureValidationSet()
|
Performance |
getSelectionCriterion()
|
double[] |
getStructureLearningGoals(weka.core.Instances dataset,
double trainPercentage)
Deprecated. |
double[] |
getStructureLearningGoals(weka.core.Instances dataset,
int numfolds,
int fold)
Deprecated. |
weka.core.Instances |
getStructureLearningInstances(weka.core.Instances dataset,
double trainPercentage)
Deprecated. |
weka.core.Instances |
getStructureLearningInstances(weka.core.Instances dataset,
int numfolds,
int fold)
Deprecated. |
double[] |
getStructureValidationGoals(weka.core.Instances dataset,
double trainPercentage)
Deprecated. |
double[] |
getStructureValidationGoals(weka.core.Instances dataset,
int numfolds,
int fold)
Deprecated. |
weka.core.Instances |
getStructureValidationInstances(weka.core.Instances dataset,
double trainPercentage)
Deprecated. |
weka.core.Instances |
getStructureValidationInstances(weka.core.Instances dataset,
int numfolds,
int fold)
Deprecated. |
abstract double[] |
localOuputOnArray(double[][] inputs,
double[] coeffs)
Calculates value that a GMDH polynomial takes in a point, for an array of points, using coeffs as coefficients. |
boolean |
noLinks()
Check if Model instance's links member is null |
void |
setErrorMeasure(Performance criterion)
|
void |
setSelectionCriterion(Performance criterion)
|
Methods inherited from class wGmdh.jGmdh.oldskul.Node |
---|
compareTo, getGlobalIdentifier, getIdentifier, getNrFolds, InitializeGraphics, networkOutput, networkOutputNoFlags, setGlobalIdentifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.ArrayList<Node> links
protected java.util.ArrayList<double[]> coeffs
protected long[] sortedLinkIds
protected Performance structureSelectionCriterion
protected Performance errorMeasure
Constructor Detail |
---|
public Model()
public Model(Node... links)
public Model(java.util.ArrayList<Node> links)
@Deprecated public Model(java.util.ArrayList<double[]> regressionGoals, java.util.ArrayList<double[]> validationGoals, Performance selectionCriterion, Performance errorMeasure, java.util.ArrayList<Node> links) throws TooBig, ExpressionEqualToZero, TooSmall
regressionGoals
- each entry in the ArrayList coresponds to
one foldvalidationGoals
- selectionCriterion
- errorMeasure
- links
-
jGMDH.exceptions.TooBig
jGMDH.exceptions.ExpressionEqualToZero
jGMDH.exceptions.TooSmall
TooBig
ExpressionEqualToZero
TooSmall
public Model(DatasetHandlerSupervised handler, Performance selectionCriterion, Performance errorMeasure, java.util.ArrayList<Node> links) throws TooBig, ExpressionEqualToZero, TooSmall
handler
- selectionCriterion
- errorMeasure
- links
-
TooBig
ExpressionEqualToZero
TooSmall
@Deprecated public Model(double[] regressionGoals, Performance selectionCriterion, Performance errorMeasure, Node... links) throws TooBig, ExpressionEqualToZero, TooSmall
regressionGoals
- selectionCriterion
- errorMeasure
- links
-
jGMDH.exceptions.TooBig
jGMDH.exceptions.ExpressionEqualToZero
jGMDH.exceptions.TooSmall
TooBig
ExpressionEqualToZero
TooSmall
@Deprecated public Model(java.util.ArrayList<double[]> regressionGoals, java.util.ArrayList<double[]> validationGoals, Performance selectionCriterion, Performance errorMeasure, Node... links) throws TooBig, ExpressionEqualToZero, TooSmall
regressionGoals
- validationGoals
- selectionCriterion
- errorMeasure
- links
-
jGMDH.exceptions.TooBig
jGMDH.exceptions.ExpressionEqualToZero
jGMDH.exceptions.TooSmall
TooBig
ExpressionEqualToZero
TooSmall
public Model(Performance selectionCriterion, Performance errorMeasure, Node... links) throws TooBig, ExpressionEqualToZero, TooSmall
selectionCriterion
- errorMeasure
- links
-
jGMDH.exceptions.TooBig
jGMDH.exceptions.ExpressionEqualToZero
jGMDH.exceptions.TooSmall
TooBig
ExpressionEqualToZero
TooSmall
Method Detail |
---|
@Deprecated public void coeffsAndErrors(weka.core.Instances datasetToFold, int numFolds) throws TooBig, TooSmall, ExpressionEqualToZero
datasetToFold
- numFolds
-
TooBig
TooSmall
ExpressionEqualToZero
@Deprecated public void coeffsAndErrors(weka.core.Instances dataset, double trainPercentage) throws TooBig, TooSmall, ExpressionEqualToZero
dataset
- trainPercentage
-
TooBig
TooSmall
ExpressionEqualToZero
public void coeffsAndErrors(DatasetHandlerSupervised handler) throws TooBig, TooSmall, ExpressionEqualToZero
handler
-
TooBig
TooSmall
ExpressionEqualToZero
public void setSelectionCriterion(Performance criterion)
public Performance getSelectionCriterion()
public void setErrorMeasure(Performance criterion)
public Performance getErrorMeasure()
protected abstract double[] coeffsFromData(double[] regressTo, double[][] trainingData) throws TooBig, TooSmall, ExpressionEqualToZero
regressTo
- regression goaltrainingData
- array of regressor values
TooBig
TooSmall
ExpressionEqualToZero
public abstract double[] localOuputOnArray(double[][] inputs, double[] coeffs) throws TooBig, TooSmall, ExpressionEqualToZero
inputs
- array of polynomial inputscoeffs
- coefficients
TooBig
TooSmall
ExpressionEqualToZero
public boolean noLinks()
@Deprecated public double[][] collectTrainingData(int fold)
fold
- fold index
@Deprecated public double[][] collectValidationData(int fold)
fold
- fold index
public java.util.ArrayList<Model.Summand> generateSummands(double[] coefficients) throws TooBig
coefficients
-
jGMDH.raw.exceptions.TooBig
TooBig
public double getErrorStructureLearningSet()
public double getErrorStructureValidationSet()
public java.util.ArrayList<double[]> getCoeffs()
@Deprecated public weka.core.Instances getStructureValidationInstances(weka.core.Instances dataset, int numfolds, int fold)
@Deprecated public double[] getStructureValidationGoals(weka.core.Instances dataset, int numfolds, int fold)
@Deprecated public weka.core.Instances getStructureLearningInstances(weka.core.Instances dataset, int numfolds, int fold)
@Deprecated public double[] getStructureLearningGoals(weka.core.Instances dataset, int numfolds, int fold)
@Deprecated public weka.core.Instances getStructureValidationInstances(weka.core.Instances dataset, double trainPercentage)
@Deprecated public double[] getStructureValidationGoals(weka.core.Instances dataset, double trainPercentage)
@Deprecated public weka.core.Instances getStructureLearningInstances(weka.core.Instances dataset, double trainPercentage)
@Deprecated public double[] getStructureLearningGoals(weka.core.Instances dataset, double trainPercentage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |