wGmdh.jGmdh.oldskul
Class CopyCat

java.lang.Object
  extended by wGmdh.jGmdh.oldskul.CopyCat

public class CopyCat
extends java.lang.Object

A class used to: - hard-copy models - retrain the model with prefixed structure


Constructor Summary
CopyCat(Model m, ModelFactory f)
           
 
Method Summary
 TwoInputModel copyStructure(weka.core.Instances trainInsts)
          Trains a new model that has the same structure as this.
 Model copyStructureAndPurify(weka.core.Instances trainInsts)
          Trains a new model that has the same structure as this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyCat

public CopyCat(Model m,
               ModelFactory f)
Method Detail

copyStructureAndPurify

public Model copyStructureAndPurify(weka.core.Instances trainInsts)
                             throws TooBig,
                                    ExpressionEqualToZero,
                                    TooSmall,
                                    java.lang.Exception
Trains a new model that has the same structure as this. Its coefficients will be calculated from the {inputs, goal} dataset. Similar approach can be used to make a deep copy of a model (everything the same, except the coefficients get copied, no need to calculate them). Outputs of all submodels will be nullified.

Parameters:
trainInsts -
Returns:
Throws:
TooBig
ExpressionEqualToZero
TooSmall
java.lang.Exception

copyStructure

public TwoInputModel copyStructure(weka.core.Instances trainInsts)
                            throws TooBig,
                                   ExpressionEqualToZero,
                                   TooSmall
Trains a new model that has the same structure as this. Its coefficients will be calculated from the {inputs, goal} dataset. Similar approach can be used to make a deep copy of a model (everything the same, except the coefficients get copied, no need to calculate them).

Parameters:
trainInsts -
Returns:
Throws:
TooBig
ExpressionEqualToZero
TooSmall