|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcodesimian.CS<CSGeneric>
codesimian.DefaultCS
codesimian.LearnSelfDFromSelfListD
public class LearnSelfDFromSelfListD
generalized intelligence. This is a list whose values are interpreted as D.
When this LearnDFromListD is executed as D, it returns a predicted output value
that is learned every time you call thisLearnDFromListD.setD(double). D means double.
It learns the D inputs at the time you call setD, in combination with the D you set.
I am a list of D. Like all CSs, I have an overall D value. When you set my value (by using setD),
I look at the Ds in the list. Later if I see a similar pattern of Ds in that same list,
my D value (the D function) will be similar to the D value you set my value to (with setD).
I learn what Ds go with what output D and I interpolate between them.
I know how to grow a bayesian network, and later I may use other algorithms
without telling you... I learn my own D value from the D values in myself as
a list and the D value you simultaneously (to the list of D) set me to. TODO: rewrite this.
For example, the codesimian code: =D(learnSelfDFromSelfListD#lrn(.1 .2 .3) .4)
pairs .1 .2 and .3 with the output value .4, and if you set it to lrn(.1 .2 .7)
then that should produce a value closer to .4 than lrn(.7 .2 .3) produces.
You can use very large input sizes because it is not limited like a bayes-node.
It may use bayes-network(s) or other intelligent algorithms.
This class should not be tied to any specific algorithm(s).
TODO: it should dynamicly select which algorithm(s) to use for which data.
8/2007 it only uses a SimpleBayesNet.
| Nested Class Summary | |
|---|---|
static class |
LearnSelfDFromSelfListD.Test
Tests a new SimpleBayesNet or P(0) used as a SimpleBayesNet. |
| Field Summary |
|---|
| Fields inherited from class codesimian.CS |
|---|
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS |
| Constructor Summary | |
|---|---|
LearnSelfDFromSelfListD()
|
|
| Method Summary | |
|---|---|
boolean |
deleteP(int index,
CS value)
|
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()
Execute this CS and cast to double. |
boolean |
insertP(int index,
CS value)
same as setP(int,CS) but inserts instead of overwriting. |
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()". |
java.lang.Object |
L(java.lang.Class c)
Optionally execute this CS, and definitely try to CAST it to the specified Java type. |
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. |
void |
rebuildIntelligence(int arraySize,
java.util.List<double[]> listOfDoubleArray,
java.util.List<java.lang.Double> listOfOutputDs)
|
boolean |
setD(double d)
all setX functions return setD by default. |
boolean |
setP(int index,
CS value)
Every CS is a list of other CSs, between size minP() and maxP() inclusive. |
| 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, insertS, insertZ, J, javaCode, LForProxy, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, 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, cost, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, JForProxy, 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 |
| Constructor Detail |
|---|
public LearnSelfDFromSelfListD()
| Method Detail |
|---|
public int minP()
DefaultCS
minP in class DefaultCSpublic int maxP()
CS
maxP in class CSpublic java.lang.String keyword()
DefaultCS
keyword in class DefaultCSCS.parent(),
CS.newInstance(),
CS.name()public java.lang.String description()
CS
description in class DefaultCSpublic double DForProxy()
CS
DForProxy in class DefaultCSpublic boolean setD(double d)
DefaultCS
setD in class DefaultCSpublic java.lang.Object L(java.lang.Class c)
CS
L in class CSCS.Z(),
CS.B(),
CS.C(),
CS.S(),
CS.I(),
CS.J(),
CS.F(),
CS.D()
public void rebuildIntelligence(int arraySize,
java.util.List<double[]> listOfDoubleArray,
java.util.List<java.lang.Double> listOfOutputDs)
public boolean setP(int index,
CS value)
CS
setP in class DefaultCS
public boolean insertP(int index,
CS value)
CS
insertP in class DefaultCS
public boolean deleteP(int index,
CS value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||