|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.CS<CSGeneric>
codesimian.DefaultCS
codesimian.BayesNode
codesimian.ContinuousBayesNode
public class ContinuousBayesNode
continuousBayesNode(list(childs...) list(probabilities...))
returns the predicted value of its first child in the list.
If P(2) exists, it is the LEARNING SPEED, which ranges 0 - 1. Closer to 0 is best.
If not, the default learning speed is used, approximately .05
CHANGE THE JAVADOC: Instead of predicting the last child, the FIRST child is predicted.
EXTERNAL TRAINING VS SELF TRAINING:
Similar to BayesNode, but modifies its own probability list (P(1))
by slowly averaging in child values. Every time this ContinuousBayesNode executes,
it gets the values of its childs and slightly updates the probabilities.
ContinuousBayesNode returns the PREDICTED value of the last child (P(1).P(P(1).countP()-1))
LIST SIZES:
Unlike a normal BayesNode, probability list's size must be 2^(child lists's size).
A normal bayesnode has a probability list has size 2^(child lists's size + 1)
because the normal bayesnode's probability is included as a child,
but a continuousBayesNode does not predict its own value. Instead it predicts
the value of continuousBayesNode.P(0).P(0).D() which must be between 0.0 and 1.
THIS CLASS SHOULD BE CHANGED TO PREDICT THE VALUE OF ITS FIRST CHILD INSTEAD OF THE LAST
BECAUSE IN CODESIMIAN CODE YOU CAN USE 0 INSTEAD OF countP(x) AND REPLACING x WITH AN =P.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class codesimian.BayesNode |
---|
BayesNode.VerifyCountP |
Field Summary | |
---|---|
static double |
defaultAverageErrorStart
|
static double |
defaultLearningSpeed
|
Fields inherited from class codesimian.BayesNode |
---|
TYPE |
Fields inherited from class codesimian.CS |
---|
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS |
Constructor Summary | |
---|---|
ContinuousBayesNode()
|
Method Summary | |
---|---|
double |
averageError()
|
static void |
copyArrayToCS(double[] array,
CS list)
|
java.lang.String |
description()
a short description of this CS, shorter than the javadoc, but long enough to tell what the params are for. |
double |
DForProxy()
returns this node's CHANCE (0.0 to 1) based on the DForProxy()s/chances of param0's params and the conditional-probabilities in param1. |
java.lang.String |
keyword()
For the CodeSimian language as a String. CodeSimian language keyword, like "+" "*" "max" ">" etc. Override this function if you want to specify a keyword other than how I derive them from the class name, like + for Add. Some CSs might never be intended to be used in the language by their keyword. The best example (4/05) is Num, because it is used in the language like "3.4" instead of "num()". |
int |
maxP()
Maximum quantity of Params |
int |
minP()
For DForProxy(). Minimum number of parameters in param[] needed to call DForProxy(). Defines which indexs of param[] DForProxy() can use. Functions with a different number of parameters must override this. OVERRIDE THIS FUNCTION IF EXEC USES A DIFFERENT NUMBER OF PARAMETERS. Default is 1. |
boolean |
setD(double execValue)
Removes all child bayes-nodes and all conditional-probabilities. |
Methods inherited from class codesimian.BayesNode |
---|
addToHistory, adjustBitChance, bitChance, childCountForCondProbSize, cost, makeArraySumTo1, PType, sum |
Methods inherited from class codesimian.DefaultCS |
---|
B, C, countP, decrementMyFuel, deleteP, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, LForProxy, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, S, setB, setC, setCountP, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setPType, setS, setZ, start, toString, V, Z |
Methods inherited from class codesimian.CS |
---|
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, BForProxy, CForProxy, clone, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, JForProxy, L, L, L, L, L, maxD, minD, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, reflect6, setB, SETB, setC, SETC, setCost, SETD, setDescription, setF, SETF, setHeap, setI, SETI, setJ, SETJ, SETL, setL, setL, setParent, setParsePriority, setProxyOf, setS, SETS, setTester, setZ, SETZ, SForProxy, tester, toJavaCode, VForProxy, voidReflect, ZForProxy |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double defaultLearningSpeed
public static final double defaultAverageErrorStart
Constructor Detail |
---|
public ContinuousBayesNode()
Method Detail |
---|
public double averageError()
public double DForProxy()
BayesNode
DForProxy
in class BayesNode
public int minP()
DefaultCS
minP
in class BayesNode
public int maxP()
CS
maxP
in class BayesNode
public java.lang.String keyword()
DefaultCS
keyword
in class BayesNode
CS.parent()
,
CS.newInstance()
,
CS.name()
public java.lang.String description()
CS
description
in class BayesNode
public boolean setD(double execValue)
BayesNode
setD
in class BayesNode
public static void copyArrayToCS(double[] array, CS list)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |