public class ProposalFunction extends NumberFunction
value
EMPTY_TERM, parts
Constructor and Description |
---|
ProposalFunction(java.lang.String name,
double initialValue) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
int[] |
getSample(java.util.Random r,
int numToSample) |
ATerm |
ground(Binds binds,
Updatable neededBy) |
double |
hillClimb(CRFState crfState,
java.util.Random rand,
int sampleSize,
Regularizer regularize) |
double |
hillClimb(CRFState crfState,
java.util.Random rand,
Regularizer regularize) |
double |
hillClimbOld(CRFState crfState,
java.util.Random rand,
int sampleSize,
Regularizer regularize) |
boolean |
isGround(Binds binds) |
static double |
jointHillclimb(CRFState crfState,
ProposalFunction one,
ProposalFunction two,
int sampleSize,
Regularizer regularize) |
double |
percentPositiveWhereOccurrs()
WARNING: only applies in the SampleWalkLogistic optimization!
assumes that this proposal function is used by FuncLogProgScore specifically
|
double |
scanMAP(CRFState crfState,
java.util.Random rand,
double min,
double max,
int tries) |
double |
scanMAP(CRFState crfState,
java.util.Random rand,
double min,
double max,
int tries,
int sampleSize) |
double |
scanMAP(CRFState crfState,
java.util.Random rand,
double min,
double max,
int tries,
int sampleSize,
Regularizer regularize) |
double |
scanMAP(CRFState crfState,
java.util.Random rand,
double min,
double max,
int tries,
Regularizer regularize) |
void |
setSampleValue(double v,
int[] sample) |
void |
setValue(double v) |
java.lang.String |
toString() |
double |
tryZero(CRFState crfState,
java.util.Random rand,
int sampleSize,
Regularizer regularize) |
double |
tryZero(CRFState crfState,
java.util.Random rand,
Regularizer regularize) |
void |
update(Function source,
java.lang.Object... msg) |
getValue
addUsedBy, getUsedBy, isFunctionFree, isReady, parserSetsFocusIndicator, valueClone, valueEquals, valueHash, zzParserInitUsedBy
compareTo
crossClassCompare, gatherTopFunctions, getBoolean, getCollection, getDouble, getInt, getSparseVector, getString, getTerm, getVector, mdjbFirst, mdjbNext, testRecursive
public ProposalFunction(java.lang.String name, double initialValue)
public java.lang.String getName()
public boolean isGround(Binds binds)
isGround
in class CompositeTerm
public void setValue(double v)
public void setSampleValue(double v, int[] sample)
public int[] getSample(java.util.Random r, int numToSample)
public void update(Function source, java.lang.Object... msg)
public static double jointHillclimb(CRFState crfState, ProposalFunction one, ProposalFunction two, int sampleSize, Regularizer regularize)
public double percentPositiveWhereOccurrs()
public double tryZero(CRFState crfState, java.util.Random rand, int sampleSize, Regularizer regularize)
public double tryZero(CRFState crfState, java.util.Random rand, Regularizer regularize)
public double hillClimb(CRFState crfState, java.util.Random rand, Regularizer regularize)
public double hillClimb(CRFState crfState, java.util.Random rand, int sampleSize, Regularizer regularize)
public double hillClimbOld(CRFState crfState, java.util.Random rand, int sampleSize, Regularizer regularize)
public double scanMAP(CRFState crfState, java.util.Random rand, double min, double max, int tries, int sampleSize)
public double scanMAP(CRFState crfState, java.util.Random rand, double min, double max, int tries, Regularizer regularize)
public double scanMAP(CRFState crfState, java.util.Random rand, double min, double max, int tries, int sampleSize, Regularizer regularize)
public double scanMAP(CRFState crfState, java.util.Random rand, double min, double max, int tries)