liveBook · Manning

Unsupervised learning

As explained in Natural Language Processing in Action, Second Edition

Unsupervised learning is a machine-learning approach that derives patterns or representations directly from data without human-provided target labels.

Unsupervised learning derives patterns or representations directly from data without human-assigned target labels. Word2Vec illustrates the idea with raw text: nearby words provide dataset-generated training signals, while the learned vector captures word meaning. section 6.3

Word-embedding training makes the approach concrete:

  • Gather raw text from a domain such as medical journals, Wikipedia, or news articles. section 6.3.2
  • Construct many local context examples with continuous bag-of-words or continuous skip-gram training. section 6.3.2
  • Use prediction as a means to build vectors whose geometry captures semantic relationships. section 6.3

Word2Vec from surrounding words

A corpus mentioning Marie Curie near science-related words, the Timbers near soccer terms, and Portland near city terms supplies enough context for Word2Vec to learn useful associations without manually labeling those meanings. section 6.3

Listing 6.1 Computing nessvector
>>> from nessvec.examples.ch06.nessvectors import *    #1
>>> nessvector('Marie_Curie').round(2)
placeness     -0.46
peopleness     0.35     #2
animalness     0.17
conceptness   -0.32
femaleness     0.26

Inspecting a learned vector for Marie Curie makes the abstract representation concrete through interpretable dimensions such as placeness, peopleness, and femaleness. section 6.3

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Explains dataset-generated labels, contextual prediction, vector representations, CBOW, and skip-gram training.
Examples
Uses corpora, nearby-word prediction, Marie Curie associations, and a learned nessvector as concrete examples.
What it assumes
Assumes access to raw text and a chosen domain; teaches the distinction between human labels and dataset-generated training signals.
What you can do after
Evaluate learned word representations and understand how raw text can support embedding training without manual semantic labels.
How it connects
Connects unsupervised learning with supervised learning, word embeddings, Word2Vec, GloVe, fastText, CBOW, skip-gram, LSA, and LDiA.

Also explained in

Compare how 20 books explain unsupervised learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.