Package net.sf.tweety.logics.pl.analysis
Class HsInconsistencyMeasurementProcess
- java.lang.Object
-
- java.lang.Thread
-
- net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess<PlFormula>
-
- net.sf.tweety.logics.pl.analysis.HsInconsistencyMeasurementProcess
-
- All Implemented Interfaces:
java.lang.Runnable
public class HsInconsistencyMeasurementProcess extends InconsistencyMeasurementProcess<PlFormula>
Implements an approximation algorithm for the Hs inconsistency measure on streams.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_KEY_NUMBEROFPOPULATIONS
Configuration key for the number of populations tried out.static java.lang.String
CONFIG_KEY_SIGNATURE
Configuration key for the signature.static java.lang.String
CONFIG_SMOOTHINGFACTOR
Key for the configuration map that points to the smoothing factor to be used.private double
currentValue
Current inconsistency value.private java.util.Collection<java.util.List<PossibleWorld>>
hittingSets
The current candidate populations for a hitting set.private int
numberOfPopulations
The number of populations.private int
numFormulas
The number of formulas encountered.private java.util.Random
rand
For randomization.private PlSignature
sig
The signature of the formulas.private double
smoothingFactor
Whether the inconsistency value should be smoothed: if X1 is the previous inconsistency value, X2 is the new inconsistency value on the new window, then the actual new inconsistency value X is determined by X=X1*smoothingFactor + X2*(1-smoothingFactor).private ConsistencyWitnessProvider<PlBeliefSet,PlFormula>
witnessProvider
The witness provider used.-
Fields inherited from class net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess
CONFIG_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description HsInconsistencyMeasurementProcess()
-
Method Summary
-
Methods inherited from class net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess
abort, getInconsistencyValue, init, run
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
-
-
-
-
Field Detail
-
CONFIG_KEY_SIGNATURE
public static final java.lang.String CONFIG_KEY_SIGNATURE
Configuration key for the signature.- See Also:
- Constant Field Values
-
CONFIG_KEY_NUMBEROFPOPULATIONS
public static final java.lang.String CONFIG_KEY_NUMBEROFPOPULATIONS
Configuration key for the number of populations tried out.- See Also:
- Constant Field Values
-
CONFIG_SMOOTHINGFACTOR
public static final java.lang.String CONFIG_SMOOTHINGFACTOR
Key for the configuration map that points to the smoothing factor to be used. if X1 is the previous inconsistency value, X2 is the new inconsistency value on the new window, then the actual new inconsistency value X is determined by X=X1*smoothingFactor + X2*(1-smoothingFactor). This value should be between 0 and 1. If it is -1 no smoothing is done (the same as setting the smoothing factor to 0.- See Also:
- Constant Field Values
-
hittingSets
private java.util.Collection<java.util.List<PossibleWorld>> hittingSets
The current candidate populations for a hitting set.
-
sig
private PlSignature sig
The signature of the formulas.
-
witnessProvider
private ConsistencyWitnessProvider<PlBeliefSet,PlFormula> witnessProvider
The witness provider used.
-
rand
private java.util.Random rand
For randomization.
-
smoothingFactor
private double smoothingFactor
Whether the inconsistency value should be smoothed: if X1 is the previous inconsistency value, X2 is the new inconsistency value on the new window, then the actual new inconsistency value X is determined by X=X1*smoothingFactor + X2*(1-smoothingFactor). This value should be between 0 and 1. If it is -1 no smoothing is done.
-
currentValue
private double currentValue
Current inconsistency value.
-
numFormulas
private int numFormulas
The number of formulas encountered.
-
numberOfPopulations
private int numberOfPopulations
The number of populations.
-
-
Method Detail
-
init
protected void init(java.util.Map<java.lang.String,java.lang.Object> config)
Description copied from class:InconsistencyMeasurementProcess
Additional initialization statements are put here.- Specified by:
init
in classInconsistencyMeasurementProcess<PlFormula>
- Parameters:
config
- the configuration
-
update
protected double update(PlFormula formula)
Description copied from class:InconsistencyMeasurementProcess
Updates the inconsistency value with the new formula.- Specified by:
update
in classInconsistencyMeasurementProcess<PlFormula>
- Parameters:
formula
- some formula.- Returns:
- the current inconsistency value.
-
toString
public java.lang.String toString()
- Specified by:
toString
in classInconsistencyMeasurementProcess<PlFormula>
-
-