|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--Util.Stats
|
+--Util.CompositionalStats
Implementation of the statistics.
Copyright (c) 2004 Paul Vogt
| Field Summary | |
protected double[] |
comp
|
protected double[] |
cs
|
protected double[] |
ds
|
protected int |
end
|
protected int |
game
|
protected int |
mid
|
| Fields inherited from class Util.Stats |
iCoherence, pCoherence, update |
| Constructor Summary | |
CompositionalStats()
constructor |
|
| Method Summary | |
double[] |
getComp()
|
double |
getCompositionality()
|
double[] |
getCS()
|
double[] |
getDS()
|
int |
getEnd()
|
int |
getGame()
|
double |
getICoh()
|
int |
getMid()
|
double |
getPCoh()
|
boolean |
getUpdate()
|
void |
logFile(java.io.PrintWriter outfile)
This function writes the statistics of each game to the logfile. |
void |
print()
Function to write the game information to the standard output |
void |
reinitialize(char c)
This function reinitialises the statistics at the start of each iteration in the iterated learning model and when a new game is started. |
protected int |
rescale()
This function rescales the arrays for the UI |
void |
update(Agent S,
Agent H,
int t)
This function calls itself with an additional argument (test=false) |
void |
update(Agent S,
Agent H,
int t,
boolean test)
Updates the statistics at the end of each language game. |
void |
updateCoherence(double x,
double y)
|
void |
updateCoherence(double x,
double y,
double z)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected double[] cs
protected double[] ds
protected double[] comp
protected int game
protected int mid
protected int end
| Constructor Detail |
public CompositionalStats()
| Method Detail |
protected int rescale()
rescale in class Statspublic void reinitialize(char c)
reinitialize in class Statsc - ='n' if a new game is started.
public void update(Agent S,
Agent H,
int t)
update in class StatsS - the speaker AgentH - the hearer Agentt - the agent's type
public void update(Agent S,
Agent H,
int t,
boolean test)
S - the speaker AgentH - the hearer Agentt - the agent's typetest - whether the update is done during testing (true) or not.public void logFile(java.io.PrintWriter outfile)
logFile in class Statsoutfile - the logfile.public void print()
print in class Statspublic double[] getComp()
public double[] getCS()
getCS in class Statspublic double[] getDS()
getDS in class Statspublic int getGame()
getGame in class Statspublic int getMid()
getMid in class Statspublic int getEnd()
getEnd in class Statspublic double getICoh()
getICoh in class Statspublic double getPCoh()
getPCoh in class Statspublic double getCompositionality()
public void updateCoherence(double x,
double y)
updateCoherence in class Stats
public void updateCoherence(double x,
double y,
double z)
public boolean getUpdate()
getUpdate in class Stats
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||