sg.edu.nus.comp.nlp.ims.classifiers
Class CLibLinearTrainer

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.classifiers.CLibLinearTrainer
All Implemented Interfaces:
IModelTrainer

public class CLibLinearTrainer
extends java.lang.Object
implements IModelTrainer

call liblinear classifier to train model for instances of a lexelt.

Author:
zhongzhi

Field Summary
protected  double m_Bias
           
 
Constructor Summary
CLibLinearTrainer()
           
 
Method Summary
 liblinear.Parameter getParam()
          get parameters
 void setOptions(java.lang.String[] options)
          set options
 void setParam(liblinear.Parameter p_Param)
          set parameters
 java.lang.Object train(java.lang.Object p_Lexelt)
          train a model with instances in p_Lexelt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Bias

protected double m_Bias
Constructor Detail

CLibLinearTrainer

public CLibLinearTrainer()
Method Detail

setParam

public void setParam(liblinear.Parameter p_Param)
set parameters

Parameters:
p_Param - paramters

getParam

public liblinear.Parameter getParam()
get parameters

Returns:
parameters

setOptions

public void setOptions(java.lang.String[] options)
Description copied from interface: IModelTrainer
set options

Specified by:
setOptions in interface IModelTrainer
Parameters:
options - options

train

public java.lang.Object train(java.lang.Object p_Lexelt)
                       throws java.lang.Exception
Description copied from interface: IModelTrainer
train a model with instances in p_Lexelt

Specified by:
train in interface IModelTrainer
Parameters:
p_Lexelt - lexelt
Returns:
model
Throws:
java.lang.Exception - train exception