tmpLearn
Class NaiveDNLearner

java.lang.Object
  extended by infer.Infer
      extended by tmpLearn.Learner
          extended by tmpLearn.NaiveDNLearner

public class NaiveDNLearner
extends Learner

Learner instance using diagonal Newton. Note, this is a very simple diagonal Newton learner. When use it for real circumstance, please check it carefully...


Field Summary
 double alpha
           
 double lambda
           
 int nCall
           
 java.util.HashMap<java.lang.String,java.lang.Double> oldD
           
 double oldDG
           
 double oldDHD
           
 java.util.HashMap<java.lang.String,java.lang.Double> oldDW
           
 java.util.HashMap<java.lang.String,java.lang.Double> oldG
           
 
Fields inherited from class tmpLearn.Learner
backtrackCount_, backtracked, currentD, currentWeight, finalWeight, isFirstTime, isHardMappings, odds, oldWeight, trainingSatisification, trainingViolation
 
Fields inherited from class infer.Infer
db, grounding, mln, options
 
Constructor Summary
NaiveDNLearner()
           
 
Method Summary
 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 tmpLearn.Learner
dumpAnswers, fillInCurrentWeight, run, validatingLearningPerformance
 
Methods inherited from class infer.Infer
cleanUp, ground, loadMLN, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alpha

public double alpha

lambda

public double lambda

nCall

public int nCall

oldD

public java.util.HashMap<java.lang.String,java.lang.Double> oldD

oldDG

public double oldDG

oldDHD

public double oldDHD

oldDW

public java.util.HashMap<java.lang.String,java.lang.Double> oldDW

oldG

public java.util.HashMap<java.lang.String,java.lang.Double> oldG
Constructor Detail

NaiveDNLearner

public NaiveDNLearner()
Method Detail

loadingTrainingData

public void loadingTrainingData(MCSAT _mcsat)
Loading training data's truth value into MRF.

Specified by:
loadingTrainingData in class Learner
Parameters:
_mcsat - The MCSAT object to be filled in.

updateWeight

public boolean updateWeight(MCSAT mcsat)
Updating Learner.currentWeight using Diagonal Newton method.

Specified by:
updateWeight in class Learner
Parameters:
mcsat - MCSAT instance after this iteration.
Returns:
Whether terminate.