train(output,
task=None,
detector=None,
inputFiles=None,
models=None,
parse=None,
processUnmerging=None,
processModifiers=None,
isSingleStage=False,
bioNLPSTParams=None,
preprocessorParams=None,
exampleStyles=None,
classifierParams=None,
doFullGrid=False,
deleteOutput=False,
copyFrom=None,
log=' log.txt ' ,
step=None,
omitSteps=None,
debug=False,
connection=None)
| source code
|
Train a new model for event or relation detection.
- Parameters:
output - A directory where output files will appear.
task - If defined, overridable default settings are used for many of the
training parameters. Must be one of the supported TEES tasks.
detector - a Detector object, or a string defining one to be imported
inputFiles - A dictionary of file names, with keys "train",
"devel" and, "test"
models - A dictionary of file names defining the place for the new models,
with keys "devel" and, "test"
parse - The parse element name in the training interaction XML
processUnmerging - Use the unmerging step of EventDetector. True, False or None for
task default.
processModifiers - Use the modifier detection step of EventDetector. True, False or
None for task default.
isSingleStage - False for EventDetector, True for a single stage detector.
bioNLPSTParams - Parameters controlling BioNLP ST format output.
preprocessorParams - Parameters controlling the preprocessor. Not used for training,
but saved to the model for use when classifying.
exampleStyles - A parameter set for controlling example builders.
classifierParams - A parameter set for controlling classifiers.
doFullGrid - Whether all parameters, as opposed to just recall adjustment, are
tested in the EventDetector grid search.
deleteOutput - Remove an existing output directory
copyFrom - Copy an existing output directory for use as a template
log - An optional alternative name for the log file. None is for no
logging.
step - A step=substep pair, where the steps are "TRAIN",
"DEVEL", "EMPTY" and "TEST"
omitSteps - step=substep parameters, where multiple substeps can be defined.
debug - In debug mode, more output is shown, and some temporary
intermediate files are saved
connection - A parameter set defining a local or remote connection for
training the classifier
|