edu.cuny.cat.stat
Class DistributionBasedScoreDaysCondition
java.lang.Object
edu.cuny.cat.stat.AbstractScoreDaysCondition
edu.cuny.cat.stat.DistributionBasedScoreDaysCondition
- All Implemented Interfaces:
- AuctionEventListener, ScoreDaysCondition, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
public class DistributionBasedScoreDaysCondition
- extends AbstractScoreDaysCondition
A ScoreDaysCondition
defines that game days are chosen for scoring
with probabilities according to the cumulative distribution function of a
certain distribution. Since some distributions are defined only on a certain
range, a linear transformation is used to map its output to a desired range.
Suppose the length of a game is x
days and as the time moves on,
the probability of counting a day for scoring is hoped to increase, then the
following lists parameter suggestions when different distributions are used:
Beta
: alpha = beta = 0.5; a = x
Binomial
: n = 10; p = 0.5; a = x/10; b = x/5
ChiSquare
: freedom = 6; a = x/10
Exponential
: lambda = 1/x
Poisson
: mean = 10; a = x/10; b = -2x/5
StudentT
: freedom = 1; a = x/10; b = x/2
The following gives a list of examples to configure various distributions:
cat.server.report.5 = edu.cuny.cat.stat.ScoreReport
cat.server.report.5.condition = edu.cuny.cat.stat.DistributionBasedScoreDaysCondition
# lambda = 1/gamelen
cat.server.report.5.condition.distribution = edu.cuny.random.Exponential
cat.server.report.5.condition.distribution.lambda = 0.0025
cat.server.report.5.condition.a = 1
cat.server.report.5.condition.b = 0
# a = gamelen/10
cat.server.report.5.condition.distribution = edu.cuny.random.ChiSquare
cat.server.report.5.condition.distribution.freedom = 6
cat.server.report.5.condition.a = 40
cat.server.report.5.condition.b = 0
# a = gamelen/10; b = gamelen/5
cat.server.report.5.condition.distribution = edu.cuny.random.Binomial
cat.server.report.5.condition.distribution.n = 10
cat.server.report.5.condition.distribution.p = 0.5
cat.server.report.5.condition.a = 40
cat.server.report.5.condition.b = 80
# a = gamelen/10; b = gamelen/2
cat.server.report.5.condition.distribution = edu.cuny.random.StudentT
cat.server.report.5.condition.distribution.mean = 1
cat.server.report.5.condition.a = 40
cat.server.report.5.condition.b = 200
# a = gamelen/10; b = - 2*gamelen/5
cat.server.report.5.condition.distribution = edu.cuny.random.Poisson
cat.server.report.5.condition.distribution.mean = 10
cat.server.report.5.condition.a = 40
cat.server.report.5.condition.b = -160
# a = gamelen
cat.server.report.5.condition.distribution = edu.cuny.random.Beta
cat.server.report.5.condition.distribution.alpha = 0.5
cat.server.report.5.condition.distribution.beta = 0.5
cat.server.report.5.condition.a = &cat.server.gamelen;
cat.server.report.5.condition.b = 0
Parameters
base.distribution
full name of class inheriting
cern.jet.random.AbstractDistribution |
(the distribution used for choosing scoring days, e.g.
ChiSquare ) |
base.a
double (1 by default) |
(slope of the linear transformation) |
base.b
double (0 by default) |
(y-intercept of the linear transformation) |
- Version:
- $Revision: 1.9 $
- Author:
- Jinzhong Niu
Method Summary |
void |
setup(edu.cuny.config.param.ParameterDatabase parameters,
edu.cuny.config.param.Parameter base)
|
java.lang.String |
toString()
|
protected boolean |
updateTaken(int day)
determines whether the day is a scoring day or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
P_DISTRIBUTION
public static final java.lang.String P_DISTRIBUTION
- See Also:
- Constant Field Values
P_A
public static final java.lang.String P_A
- See Also:
- Constant Field Values
P_B
public static final java.lang.String P_B
- See Also:
- Constant Field Values
P_DEBUG
public static final java.lang.String P_DEBUG
- See Also:
- Constant Field Values
DEFAULT_A
public static final double DEFAULT_A
- See Also:
- Constant Field Values
DEFAULT_B
public static final double DEFAULT_B
- See Also:
- Constant Field Values
distribution
protected cern.jet.random.AbstractDistribution distribution
a
protected double a
b
protected double b
DistributionBasedScoreDaysCondition
public DistributionBasedScoreDaysCondition()
setup
public void setup(edu.cuny.config.param.ParameterDatabase parameters,
edu.cuny.config.param.Parameter base)
- Specified by:
setup
in interface edu.cuny.config.param.Parameterizable
- Overrides:
setup
in class AbstractScoreDaysCondition
updateTaken
protected boolean updateTaken(int day)
- Description copied from class:
AbstractScoreDaysCondition
- determines whether the day is a scoring day or not.
- Specified by:
updateTaken
in class AbstractScoreDaysCondition
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractScoreDaysCondition