Package org.fnlp.ml.classifier.hier

Examples of org.fnlp.ml.classifier.hier.PATrainer


   
    BaseGenerator featureGen = new BaseGenerator();
    ZeroOneLoss loss = new ZeroOneLoss();
    Inferencer msolver = new MultiLinearMax(featureGen, al, null,2);

    PATrainer trainer = new PATrainer(msolver, featureGen, loss, round,c, null);
    Linear pclassifier = trainer.train(train, null);
   
    String modelFile = path+".m.gz";
    pclassifier.saveTo(modelFile);

    long end = System.currentTimeMillis();
View Full Code Here


   
    BaseGenerator featureGen = new BaseGenerator();
    ZeroOneLoss loss = new ZeroOneLoss();
    Inferencer msolver = new MultiLinearMax(featureGen, lf, null,2);

    PATrainer trainer = new PATrainer(msolver, featureGen, loss, round,c, null);
    Linear pclassifier = trainer.train(trainset, null);
    String modelFile = "./tmp/m.gz";
    pclassifier.saveTo(modelFile);
    pclassifier = null;
   
    System.out.println("分类器测试");
View Full Code Here

TOP

Related Classes of org.fnlp.ml.classifier.hier.PATrainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.