|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfer.Infer
learn.Learner
learn.BetterDNLearner
public class BetterDNLearner
Learner instance using diagonal Newton with dynamic step size. Method used here follows: Lowd, Daniel and Domingos, Pedro (2007). Efficient Weight Learning for Markov Logic Networks. Note, this is a very simple diagonal Newton learner. When use it for real circumstance, please check it carefully...
Field Summary | |
---|---|
double |
alpha
step size. |
java.util.HashMap<java.lang.String,java.lang.Double> |
currentD
Map from clause ID to current H^(-1)g value. |
java.util.HashMap<java.lang.String,java.lang.Double> |
currentGradient
Map from clause ID to current gradient value. |
double |
lambda
lambda used to control the step size. |
int |
nCall
number of invocations of updateWeight(MCSAT) . |
java.util.HashMap<java.lang.String,java.lang.Double> |
oldD
Map from clause ID to H^(-1)g value in last iteration. |
double |
oldDG
D'g value of last iteration. |
double |
oldDHD
D'HD value of last iteration. |
java.util.HashMap<java.lang.String,java.lang.Double> |
oldG
Map from clause ID to gradient value in last iteration. |
java.util.HashMap<java.lang.String,java.lang.Double> |
oldWeight
Map from clause ID to weight in last iteration. |
Fields inherited from class learn.Learner |
---|
_oldWeight, backtrackCount_, backtracked, currentWeight, finalWeight, isHardMappings, odds, oriWeight, trainingSatisification, trainingViolation |
Constructor Summary | |
---|---|
BetterDNLearner()
|
Method Summary | |
---|---|
void |
getGradientAndD(MCSAT mcsat)
Calculate the gradient and H^(-1)g by filling in currentD and currentGradient . |
void |
loadingTrainingData(MCSAT _mcsat)
Loading training data's truth value into MRF. |
boolean |
updateWeight(MCSAT mcsat)
Updating Learner.currentWeight using Diagonal
Newton method. |
Methods inherited from class learn.Learner |
---|
calcCurrentTrainingViolation, dumpAnswers, fillInCurrentWeight, run |
Methods inherited from class infer.Infer |
---|
loadMLN |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.HashMap<java.lang.String,java.lang.Double> oldG
public java.util.HashMap<java.lang.String,java.lang.Double> oldD
public java.util.HashMap<java.lang.String,java.lang.Double> oldWeight
public java.util.HashMap<java.lang.String,java.lang.Double> currentGradient
getGradientAndD(MCSAT)
.
public java.util.HashMap<java.lang.String,java.lang.Double> currentD
getGradientAndD(MCSAT)
.
public double oldDHD
public double oldDG
public double lambda
public double alpha
public int nCall
updateWeight(MCSAT)
.
Constructor Detail |
---|
public BetterDNLearner()
Method Detail |
---|
public void loadingTrainingData(MCSAT _mcsat)
loadingTrainingData
in class Learner
_mcsat
- The MCSAT object to be filled in.public void getGradientAndD(MCSAT mcsat)
currentD
and currentGradient
.
mcsat
- MCSAT instance used to estimate the expecation of violations.public boolean updateWeight(MCSAT mcsat)
Learner.currentWeight
using Diagonal
Newton method.
updateWeight
in class Learner
mcsat
- MCSAT instance after this iteration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |