This module defines a series of objects that represent entities that can be
composed into a representation of a parameter space.
author: | Matthew Gidden <matthew.gidden _at_ gmail.com> |
-
class cyclopts.params.BoolParam(cutoff, dist=None)[source]
A class to sample binary events
Parameters: | cutoff : float
the probability cutoff, must be in (0, 1]
|
-
sample()[source]
Returns True if sampled below the cutoff, False otherwise
-
class cyclopts.params.CoeffParam(lb=0, ub=1, dist=None)[source]
A class to sample coefficient values
Parameters: | lb : float
the coefficient lower bound
ub : float
the coefficient upper bound
dist :str :
the distribution to use, default is uniform
|
-
sample()[source]
Returns a sampled coefficient
-
class cyclopts.params.Param(avg, dist=None)[source]
A class to sample events.
Parameters: | avg : float
dist : str
string representation of a distribution
|
-
sample()[source]
Return a value sampled from the distribution
-
class cyclopts.params.SupConstrParam(cutoff, rand=False, fracs=None)[source]
A base class for sampled supply constraint values.
Parameters: | cutoff : float
the lowest supply fraction
rand : bool
if True, a random supply fraction greater than or equal to the
cutoff is provided during sampling; if False, the cutoff fraction
is used
fracs : list
a collection of fractional values of commodity demand that the
supply constraint value could take; default is [0.25, 0.5, 0.75, 1]
|
-
sample()[source]
Returns a fractional supply constraint value for a commodity