public class GaussianProcessPrior extends WeightLearningApplication
Modifier and Type | Class and Description |
---|---|
protected static class |
GaussianProcessPrior.ValueAndStd |
protected static class |
GaussianProcessPrior.WeightConfig |
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PREFIX |
static boolean |
EARLY_STOPPING_DEFAULT |
static String |
EARLY_STOPPING_KEY |
static float |
EXPLORATION_DEFAULT |
static String |
EXPLORATION_KEY |
static String |
KERNEL_DEFAULT |
static String |
KERNEL_KEY |
static int |
MAX_CONFIGS_DEFAULT |
static String |
MAX_CONFIGS_KEY |
static int |
MAX_ITERATIONS_DEFAULT |
static String |
MAX_ITERATIONS_KEY |
static int |
MAX_RAND_INT_VAL |
static boolean |
RANDOM_CONFIGS_ONLY_DEFAULT |
static String |
RANDOM_CONFIGS_ONLY_KEY |
static float |
SMALL_VALUE |
allRules, atomManager, evaluator, EVALUATOR_DEFAULT, EVALUATOR_KEY, expectedIncompatibility, GROUND_RULE_STORE_DEFAULT, GROUND_RULE_STORE_KEY, groundRuleStore, inLatentMPEState, inMPEState, latentGroundRuleStore, latentTermStore, MAX_RANDOM_WEIGHT, MIN_ADMM_STEPS, mutableRules, observedDB, observedIncompatibility, RANDOM_WEIGHTS_DEFAULT, RANDOM_WEIGHTS_KEY, reasoner, REASONER_DEFAULT, REASONER_KEY, rvDB, supportsLatentVariables, TERM_GENERATOR_DEFAULT, TERM_GENERATOR_KEY, TERM_STORE_DEFAULT, TERM_STORE_KEY, termGenerator, termStore, trainingMap
Constructor and Description |
---|
GaussianProcessPrior(List<Rule> rules,
Database rvDB,
Database observedDB) |
GaussianProcessPrior(Model model,
Database rvDB,
Database observedDB) |
Modifier and Type | Method and Description |
---|---|
protected int[] |
computeScalingFactor()
Computes the amount to scale gradient for each rule.
|
protected void |
doLearn()
Do the actual learning procedure.
|
protected List<GaussianProcessPrior.WeightConfig> |
getConfigs() |
protected float |
getFunctionValue(GaussianProcessPrior.WeightConfig config) |
protected int |
getNextPoint(List<GaussianProcessPrior.WeightConfig> configs,
int iteration) |
protected GaussianProcessPrior.ValueAndStd |
predictFnValAndStd(float[] x,
List<GaussianProcessPrior.WeightConfig> xKnown)
predictFnValAndStd, but no memory sharing.
|
protected GaussianProcessPrior.ValueAndStd |
predictFnValAndStd(float[] x,
List<GaussianProcessPrior.WeightConfig> xKnown,
float[] xyStdData,
float[] kernelBuffer1,
float[] kernelBuffer2,
FloatMatrix kernelMatrixShell1,
FloatMatrix kernelMatrixShell2,
FloatMatrix xyStdMatrixShell,
FloatMatrix mulBuffer)
Do the prediction.
|
protected void |
setBlasYKnownForTest(FloatMatrix blasYKnown)
Only for testing.
|
protected void |
setKernelForTest(GaussianProcessKernel kernel)
Only for testing.
|
protected void |
setKnownDataStdInvForTest(FloatMatrix data)
Only for testing.
|
close, computeExpectedIncompatibility, computeLatentMPEState, computeLoss, computeMPEState, computeObservedIncompatibility, createAtomManager, getGroundRuleStore, getWLA, initGroundModel, initGroundModel, initGroundModel, initLatentGroundModel, learn, postInitGroundModel, setBudget, setDefaultRandomVariables, setLabeledRandomVariables
public static final String CONFIG_PREFIX
public static final String KERNEL_KEY
public static final String KERNEL_DEFAULT
public static final String MAX_ITERATIONS_KEY
public static final int MAX_ITERATIONS_DEFAULT
public static final String MAX_CONFIGS_KEY
public static final int MAX_CONFIGS_DEFAULT
public static final String EXPLORATION_KEY
public static final float EXPLORATION_DEFAULT
public static final String RANDOM_CONFIGS_ONLY_KEY
public static final boolean RANDOM_CONFIGS_ONLY_DEFAULT
public static final String EARLY_STOPPING_KEY
public static final boolean EARLY_STOPPING_DEFAULT
public static final int MAX_RAND_INT_VAL
public static final float SMALL_VALUE
public GaussianProcessPrior(List<Rule> rules, Database rvDB, Database observedDB)
protected void setKnownDataStdInvForTest(FloatMatrix data)
protected void setKernelForTest(GaussianProcessKernel kernel)
protected void setBlasYKnownForTest(FloatMatrix blasYKnown)
protected void doLearn()
WeightLearningApplication
doLearn
in class WeightLearningApplication
protected List<GaussianProcessPrior.WeightConfig> getConfigs()
protected int[] computeScalingFactor()
protected GaussianProcessPrior.ValueAndStd predictFnValAndStd(float[] x, List<GaussianProcessPrior.WeightConfig> xKnown)
protected GaussianProcessPrior.ValueAndStd predictFnValAndStd(float[] x, List<GaussianProcessPrior.WeightConfig> xKnown, float[] xyStdData, float[] kernelBuffer1, float[] kernelBuffer2, FloatMatrix kernelMatrixShell1, FloatMatrix kernelMatrixShell2, FloatMatrix xyStdMatrixShell, FloatMatrix mulBuffer)
xyStdData
- A correctly-sized buffer to perform computations with.
Will get modified.protected float getFunctionValue(GaussianProcessPrior.WeightConfig config)
protected int getNextPoint(List<GaussianProcessPrior.WeightConfig> configs, int iteration)
Copyright © 2020 University of California, Santa Cruz. All rights reserved.