public class ConfidenceAnalysis extends Object implements ModelApplication
RandomVariableAtoms
persisted in a Database
,
according to a Model
, given the Database's ObservedAtoms
.
The set of RandomVariableAtoms is those persisted in the Database when #mpeInference()
is called. This set must contain all RandomVariableAtoms the Model might access.
(DatabasePopulator
can help with this.)
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PREFIX
Prefix of property keys used by this class.
|
static int |
NUM_SAMPLES_DEFAULT
Default value for NUM_SAMPLES_KEY
|
static String |
NUM_SAMPLES_KEY
Positive integer key for the number of samples to collect for confidence
analysis.
|
static ReasonerFactory |
REASONER_DEFAULT
Default value for REASONER_KEY.
|
static String |
REASONER_KEY
Key for
Factory or String property. |
Constructor and Description |
---|
ConfidenceAnalysis(Model model,
Database db,
ConfigBundle config) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases all resources used by this ModelApplication.
|
FullConfidenceAnalysisResult |
runConfidenceAnalysis()
Infers the means and inverse standard deviations of the
RandomVariableAtoms persisted in a Database ,
according to a Model , given the Database's ObservedAtoms ,
sets them as each Atom's truth values and confidence values, and commits
them back to the Database. |
public static final String CONFIG_PREFIX
ConfigManager
,
Constant Field Valuespublic static final String NUM_SAMPLES_KEY
public static final int NUM_SAMPLES_DEFAULT
public static final String REASONER_KEY
Factory
or String property.
Should be set to a ReasonerFactory
or the fully qualified
name of one. Will be used to instantiate a Reasoner
.
public static final ReasonerFactory REASONER_DEFAULT
Value is instance of ADMMReasonerFactory
.
public ConfidenceAnalysis(Model model, Database db, ConfigBundle config)
public FullConfidenceAnalysisResult runConfidenceAnalysis() throws ClassNotFoundException, IllegalAccessException, InstantiationException
RandomVariableAtoms
persisted in a Database
,
according to a Model
, given the Database's ObservedAtoms
,
sets them as each Atom's truth values and confidence values, and commits
them back to the Database.
The RandomVariableAtoms
to be inferred are those
persisted in the Database when this method is called. All RandomVariableAtoms
which the Model might access must be persisted in the Database.
ClassNotFoundException
IllegalAccessException
InstantiationException
DatabasePopulator
public void close()
ModelApplication
close
in interface ModelApplication