From 726fb2d0b511d0273422e561078400dfd52dec19 Mon Sep 17 00:00:00 2001 From: ines Date: Thu, 23 Nov 2017 15:27:12 +0100 Subject: [PATCH] Use fewer iterations by default to avoid overfitting on blank model (resolves #1632) --- examples/training/train_new_entity_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/training/train_new_entity_type.py b/examples/training/train_new_entity_type.py index cb563ed42..a0edde45c 100644 --- a/examples/training/train_new_entity_type.py +++ b/examples/training/train_new_entity_type.py @@ -73,7 +73,7 @@ TRAIN_DATA = [ new_model_name=("New model name for model meta.", "option", "nm", str), output_dir=("Optional output directory", "option", "o", Path), n_iter=("Number of training iterations", "option", "n", int)) -def main(model=None, new_model_name='animal', output_dir=None, n_iter=50): +def main(model=None, new_model_name='animal', output_dir=None, n_iter=20): """Set up the pipeline and entity recognizer, and train the new entity.""" if model is not None: nlp = spacy.load(model) # load existing spaCy model