wGmdh.jGmdh.oldskul
Class CopyCat
java.lang.Object
wGmdh.jGmdh.oldskul.CopyCat
public class CopyCat
- extends java.lang.Object
A class used to:
- hard-copy models
- retrain the model with prefixed structure
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopyCat
public CopyCat(Model m,
ModelFactory f)
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