Text pseudonyms: accumulated word evidence into category

A lightweight classifier is understood from independent approximation, logarithm and smoothness.

Thematic shorts • IntroductionCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • A lightweight classifier is understood from independent approximation, logarithm and smoothness.
  • Check the input, label and evaluation conditions in the example

Suggested first

  • Text Tasks and Language Expressions
  • Conditional probability and vector calculations

An easy to explain starting point

Park Soybeth compares the probability of a document falling into different categories with category a priori and terminologies. The term " simple " is a separate approximation of the contribution of the word after a given category. While the natural language clearly has a sequence and mix of words, a model that assumes incomplete authenticity may still be a useful baseline for classification.

(a) Multiple versions of word frequency features, with the probability that repeated words will contribute logarithms; The Bernoli version is more concerned about the presence of words and also considers missing information. Unlike the event models, input cannot be changed to a zero matrix to assume training and to extrapolate the full equivalent. Continuous vectors should also not be directly inserted without analysis in models based on counting assumptions.

Comparison of categories with two words

Assuming that travel is the same as a priori technical, a document contains a map and a model. In the travel category, the conditions are 0.4 and 0.1 and in the technical categories 0.1 and 0.5. (b) Unconsolidated evidence of 0.04 and 0.05, respectively, resulting in a slight technical gain; The technology after reclassification was 5/9. The figures here are illustrative of construction, not any actual language statistics.

When the actual text is long, many small probabilities are easily spilled, using logarithms to turn the multiplier into a search for and more stable. If a word has never appeared in a particular category, a direct estimate of zero probability would leave the entire document with zero evidence of that type; The added smoothness preserves the quality of the missing event, while changing the unicoded denominator of all words, which cannot be added to zero without being re-uniformized.

The predictions are correct and credible

The correlation between words may allow the same evidence to be repeated. For example, two highly relevant technical terms appear together, and models treat them as two approximating independent evidences that may be overconfident. Even if classification accuracy is good, output probability requires independent calibration, especially if it is not considered directly as a reliable confidence level for downstream decision-making.

A priori also drives results when categories are uneven. A true a priori can be retained or adjusted with a clear objective, but the distribution of the assessment is explained accordingly. Prints the contribution of each word to the two logarithmic fraction differences during the checkout, usually identifying the source word, the template and the mislabelling. Compared with the depth model, the same cut and wash should be repeated, avoiding misperceptions of different amounts of information as structural differences.

s(c)=logP(c)+∑wnwlogP(w|c)

Check understanding

If the independent assumption is not strictly established, is the model completely unusable?

That doesn't have to be the case. It is a simplified general assumption, and its usefulness depends on independent evaluation. However, this cannot automatically be interpreted as a true probability of being calibrated.

Why does the cumulative scores in log space not change the comparison of categories?

logarithms are strict single-line functions that convert positive probability multipliers to logarithms and then the order of sizes is consistent, while reducing the overflow of values resulting from long text-coupling.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. scikit-learn — Naive Bayes
  2. Jurafsky and Martin — Text Classification

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.