public abstract class PerceptronTrainer extends InstanceConsumer
| Modifier and Type | Class and Description |
|---|---|
static class |
PerceptronTrainer.Result
训练结果
|
| Constructor and Description |
|---|
PerceptronTrainer() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract TagSet |
createTagSet()
创建标注集
|
protected Instance[] |
loadTrainInstances(String trainingFile,
MutableFeatureMap mutableFeatureMap) |
PerceptronTrainer.Result |
train(String trainingFile,
String modelFile) |
PerceptronTrainer.Result |
train(String trainingFile,
String developFile,
String modelFile) |
PerceptronTrainer.Result |
train(String trainingFile,
String developFile,
String modelFile,
double compressRatio,
int maxIteration,
int threadNum)
训练
|
createInstance, evaluate, evaluate, normalizeprotected abstract TagSet createTagSet()
public PerceptronTrainer.Result train(String trainingFile, String developFile, String modelFile, double compressRatio, int maxIteration, int threadNum) throws IOException
trainingFile - 训练集developFile - 开发集modelFile - 模型保存路径compressRatio - 压缩比maxIteration - 最大迭代次数threadNum - 线程数IOExceptionprotected Instance[] loadTrainInstances(String trainingFile, MutableFeatureMap mutableFeatureMap) throws IOException
IOExceptionpublic PerceptronTrainer.Result train(String trainingFile, String modelFile) throws IOException
IOExceptionpublic PerceptronTrainer.Result train(String trainingFile, String developFile, String modelFile) throws IOException
IOExceptionCopyright © 2014–2021 码农场. All rights reserved.