spaCy/website/docs/api
adrianeboyd b5d999e510 Add textcat to train CLI (#4226)
* Add doc.cats to spacy.gold at the paragraph level

Support `doc.cats` as `"cats": [{"label": string, "value": number}]` in
the spacy JSON training format at the paragraph level.

* `spacy.gold.docs_to_json()` writes `docs.cats`

* `GoldCorpus` reads in cats in each `GoldParse`

* Update instances of gold_tuples to handle cats

Update iteration over gold_tuples / gold_parses to handle addition of
cats at the paragraph level.

* Add textcat to train CLI

* Add textcat options to train CLI
* Add textcat labels in `TextCategorizer.begin_training()`
* Add textcat evaluation to `Scorer`:
  * For binary exclusive classes with provided label: F1 for label
  * For 2+ exclusive classes: F1 macro average
  * For multilabel (not exclusive): ROC AUC macro average (currently
relying on sklearn)
* Provide user info on textcat evaluation settings, potential
incompatibilities
* Provide pipeline to Scorer in `Language.evaluate` for textcat config
* Customize train CLI output to include only metrics relevant to current
pipeline
* Add textcat evaluation to evaluate CLI

* Fix handling of unset arguments and config params

Fix handling of unset arguments and model confiug parameters in Scorer
initialization.

* Temporarily add sklearn requirement

* Remove sklearn version number

* Improve Scorer handling of models without textcats

* Fixing Scorer handling of models without textcats

* Update Scorer output for python 2.7

* Modify inf in Scorer for python 2.7

* Auto-format

Also make small adjustments to make auto-formatting with black easier and produce nicer results

* Move error message to Errors

* Update documentation

* Add cats to annotation JSON format [ci skip]

* Fix tpl flag and docs [ci skip]

* Switch to internal roc_auc_score

Switch to internal `roc_auc_score()` adapted from scikit-learn.

* Add AUCROCScore tests and improve errors/warnings

* Add tests for AUCROCScore and roc_auc_score
* Add missing error for only positive/negative values
* Remove unnecessary warnings and errors

* Make reduced roc_auc_score functions private

Because most of the checks and warnings have been stripped for the
internal functions and access is only intended through `ROCAUCScore`,
make the functions for roc_auc_score adapted from scikit-learn private.

* Check that data corresponds with multilabel flag

Check that the training instances correspond with the multilabel flag,
adding the multilabel flag if required.

* Add textcat score to early stopping check

* Add more checks to debug-data for textcat

* Add example training data for textcat

* Add more checks to textcat train CLI

* Check configuration when extending base model
* Fix typos

* Update textcat example data

* Provide licensing details and licenses for data
* Remove two labels with no positive instances from jigsaw-toxic-comment
data.


Co-authored-by: Ines Montani <ines@ines.io>
2019-09-15 22:31:31 +02:00
..
annotation.md Add textcat to train CLI (#4226) 2019-09-15 22:31:31 +02:00
cli.md Add textcat to train CLI (#4226) 2019-09-15 22:31:31 +02:00
cython-classes.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
cython-structs.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
cython.md 💫 Update website (#3285) 2019-02-17 19:31:19 +01:00
dependencyparser.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
doc.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
entitylinker.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
entityrecognizer.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
entityruler.md Fix typo [ci skip] 2019-08-20 13:02:05 +02:00
goldcorpus.md 💫 Update website (#3285) 2019-02-17 19:31:19 +01:00
goldparse.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
index.md 💫 Update website (#3285) 2019-02-17 19:31:19 +01:00
kb.md Documentation for Entity Linking (#4065) 2019-09-12 11:38:34 +02:00
language.md Fix docs consistency [ci skip] 2019-09-14 16:23:37 +02:00
lemmatizer.md 💫 Adjust Table API and add docs (#4289) 2019-09-15 22:08:13 +02:00
lexeme.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
lookups.md 💫 Adjust Table API and add docs (#4289) 2019-09-15 22:08:13 +02:00
matcher.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
phrasematcher.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
pipeline-functions.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
scorer.md Add textcat to train CLI (#4226) 2019-09-15 22:31:31 +02:00
sentencizer.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
span.md Merge branch 'master' into develop 2019-09-12 18:03:01 +02:00
stringstore.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
tagger.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
textcategorizer.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
token.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
tokenizer.md Remove LEMMA from exception examples [ci skip] 2019-09-12 16:26:27 +02:00
top-level.md Remove LEMMA from exception examples [ci skip] 2019-09-12 16:26:27 +02:00
vectors.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00
vocab.md Remove u-strings and fix formatting [ci skip] 2019-09-12 16:11:15 +02:00