|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.uiuc.ge.illigal.gale.board.Board
This class contains the Ale proposal based on CGA
Field Summary | |
protected edu.uiuc.ge.illigal.gale.agents.Agent |
agnBest
Best Agent found along the run |
protected edu.uiuc.ge.illigal.gale.agents.Agent[][][] |
agnGen
The 2D board |
protected edu.uiuc.ge.illigal.gale.agents.AgentPerformance[][] |
agnPer
The current agent performance |
protected boolean[][] |
baAllIns
The mapping of the folder in the training set contains all the instances |
protected boolean |
bDump
Dump board flag |
protected edu.uiuc.ge.illigal.gale.config.GALEConfiguration |
galeCnf
GALE configuration object |
protected int |
iBoard
The current board in use |
protected int |
iMaxX
Maximum width |
protected int |
iMaxY
Maximum height |
protected edu.uiuc.ge.illigal.gale.data.InstanceSet |
insSet
GALE training instance set |
protected edu.uiuc.ge.illigal.gale.io.IOFactory |
ioFac
IOFactory used for logs |
protected edu.uiuc.ge.illigal.gale.data.OrderedSet[] |
osaFolds
The array of fold to use for cross-validation |
protected edu.uiuc.ge.illigal.gale.data.OrderedSet[][] |
osaMapping
The mapping of the folder in the training set |
protected java.util.Random |
rnd
Random number generator |
Constructor Summary | |
Board(edu.uiuc.ge.illigal.gale.config.GALEConfiguration gale,
edu.uiuc.ge.illigal.gale.data.InstanceSet ins,
edu.uiuc.ge.illigal.gale.data.OrderedSet[] osa,
edu.uiuc.ge.illigal.gale.io.IOFactory io,
boolean bD)
Builds a board initializing all the data. |
Method Summary | |
protected void |
arrangeMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
Arranges the data mapping over the board. |
edu.uiuc.ge.illigal.gale.agents.Agent |
bestAgent()
Returns the best agent obtained along the run. |
protected int[] |
bestNeighbour(int i,
int j)
Returns the position of the best neighbor for a given cell |
protected void |
computePerformance()
Computes the number of samples covered by the individual. |
protected void |
computeStatistics(int iIter,
int iMax)
Compute the statistics of the board. |
protected int |
countNeighbours(int i,
int j)
Count the number of neighbors for a given cell position. |
protected edu.uiuc.ge.illigal.gale.agents.Agent |
crossingNeighbour(int i,
int j)
Returns the crossingNeighbour. |
protected void |
evolveBoard()
Evolve the board |
edu.uiuc.ge.illigal.gale.agents.Agent[] |
fullMappedAgents()
Returns the full mapped agents |
protected int[] |
getIthNeighbour(int i,
int j,
int iNei)
Returns the ith neighbor |
protected void |
initializeStatistics()
Initializes the statistics information. |
protected void |
merge()
Implements the merge phase |
protected float |
neighbourMean(int i,
int j)
Computes the neighbor mean eval of the neighborhood of the given cell . |
protected float |
neighbourStdDev(int i,
int j,
float fMean)
Computes the standard deviation of the neighborhood scaled accuracy of the given cell . |
protected void |
pyramidTailNumberMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
Arranges the data mapping over the board |
protected void |
randomMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
Arranges the data mapping over the board with random sampling |
void |
runFold(int iFold,
java.lang.String sPre)
Builds a board initializing all the data. |
void |
split()
Split phase. |
protected int[] |
splitTargetPosition(int i,
int j)
Calculates the destination of the splitted agent on the board. |
protected void |
survival()
Implements the survival phase |
protected void |
traceAccuracy()
Traces the accuracy board. |
protected void |
traceComplexity()
Traces the complexity board. |
protected void |
traceSummary(int iIter)
Summaries the |
protected void |
uniformMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
Arranges the data mapping over the board uniformly |
protected void |
updatePerformance()
Updates the performance references. |
private int[] |
worstNeighbour(int i,
int j)
Returns the worst neighbor for the given cell. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected edu.uiuc.ge.illigal.gale.config.GALEConfiguration galeCnf
protected edu.uiuc.ge.illigal.gale.data.InstanceSet insSet
protected edu.uiuc.ge.illigal.gale.data.OrderedSet[] osaFolds
protected edu.uiuc.ge.illigal.gale.io.IOFactory ioFac
protected java.util.Random rnd
protected edu.uiuc.ge.illigal.gale.agents.Agent[][][] agnGen
protected int iBoard
protected edu.uiuc.ge.illigal.gale.agents.AgentPerformance[][] agnPer
protected int iMaxX
protected int iMaxY
protected edu.uiuc.ge.illigal.gale.data.OrderedSet[][] osaMapping
protected boolean[][] baAllIns
protected edu.uiuc.ge.illigal.gale.agents.Agent agnBest
protected boolean bDump
Constructor Detail |
public Board(edu.uiuc.ge.illigal.gale.config.GALEConfiguration gale, edu.uiuc.ge.illigal.gale.data.InstanceSet ins, edu.uiuc.ge.illigal.gale.data.OrderedSet[] osa, edu.uiuc.ge.illigal.gale.io.IOFactory io, boolean bD)
gale
- The GALE environment configuration objectins
- The instance set availableosa
- The array of folds for cross-validationio
- The IOFactory to usebD
- Dumps the board traceMethod Detail |
public void runFold(int iFold, java.lang.String sPre) throws java.lang.Exception
iFold
- the fold to be run. -1 runs the whole instance set.sPre
- the preface file information
java.lang.Exception
- Not valid mapping strategypublic edu.uiuc.ge.illigal.gale.agents.Agent bestAgent()
public edu.uiuc.ge.illigal.gale.agents.Agent[] fullMappedAgents()
protected void evolveBoard() throws java.lang.Exception
java.lang.Exception
- exception raise in some of the phase of GALEpublic void split() throws java.lang.Exception
java.lang.Exception
- exception raise in some of the phase of GALEprotected int[] splitTargetPosition(int i, int j)
i
- The Y position of the agentj
- The X position of the agent
private int[] worstNeighbour(int i, int j)
i
- The Y position of the agentj
- The X position of the agent
protected void merge() throws java.lang.Exception
java.lang.Exception
- could not clone an agentprotected edu.uiuc.ge.illigal.gale.agents.Agent crossingNeighbour(int i, int j)
i
- The y position of the current agent in the boardj
- The x position of the current agent in the board
protected int[] getIthNeighbour(int i, int j, int iNei)
i
- The y position of the cellj
- The x position of the celliNei
- The neighbor searched
protected void survival() throws java.lang.Exception
java.lang.Exception
- could not clone an agentprotected void updatePerformance()
protected int countNeighbours(int i, int j)
i
- The y positionj
- The x position
protected int[] bestNeighbour(int i, int j)
i
- The y positionj
- The x position
protected float neighbourMean(int i, int j)
i
- The y positionj
- The x position
protected float neighbourStdDev(int i, int j, float fMean)
i
- The y positionj
- The x positionfMean
- the mean value
protected void initializeStatistics()
protected void computeStatistics(int iIter, int iMax) throws java.lang.Exception
iIter
- current board iteration
java.lang.Exception
- Not valid mapping strategyprotected void traceSummary(int iIter) throws java.lang.Exception
java.lang.Exception
protected void traceAccuracy() throws java.lang.Exception
java.lang.Exception
protected void traceComplexity() throws java.lang.Exception
java.lang.Exception
protected void arrangeMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os) throws java.lang.Exception
os
- The set of available instances
java.lang.Exception
- Not valid mapping strategyprotected void computePerformance() throws java.lang.Exception
java.lang.Exception
- Problems appeared when cloningprotected void uniformMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
os
- The set of available instancesprotected void randomMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
os
- The set of available instancesprotected void pyramidTailNumberMapping(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
os
- The set of available instances
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |