struct.alg
Class KBestMiraUpdator

java.lang.Object
  extended by struct.alg.KBestMiraUpdator
All Implemented Interfaces:
OnlineUpdator

public class KBestMiraUpdator
extends java.lang.Object
implements OnlineUpdator

The KBestMiraUpdator updates the weights of the predictor.

Version:
08/15/2006

Field Summary
private  double C
           
private  int K
           
 
Constructor Summary
KBestMiraUpdator(int K)
           
KBestMiraUpdator(int K, double C)
           
 
Method Summary
 void update(SLInstance inst, Features feats, Predictor predictor, double avg_upd)
          Updates the predictor based on the instance and its features.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

C

private double C

K

private int K
Constructor Detail

KBestMiraUpdator

public KBestMiraUpdator(int K)
Parameters:
K - - the K in KBestMira

KBestMiraUpdator

public KBestMiraUpdator(int K,
                        double C)
Parameters:
K - - the K in KBestMira
C - - The slack variable (clipping). Reasonable values are .1, .01. 1 usually ensures a full update, 0 will never update.
Method Detail

update

public void update(SLInstance inst,
                   Features feats,
                   Predictor predictor,
                   double avg_upd)
Description copied from interface: OnlineUpdator
Updates the predictor based on the instance and its features.

Specified by:
update in interface OnlineUpdator


Copyright (C) 2006 University of Pennsylvania.