liveBook · Manning

Supervised learning

As explained in Learn AI-Assisted Python Programming, Second Edition

Supervised learning is a machine-learning approach that learns from examples paired with categories or target outputs.

Supervised learning learns from examples paired with known categories or target outputs, then predicts the category of a new object. section 11.1

An authorship-identification task follows this pattern:

  • Collect training data: book texts paired with their authors. section 11.1
  • Calculate features such as average word length, average words per sentence, and sentence complexity. section 11.1 section 11.8
  • Use the learned relationship between features and authors to predict the author of a book with an unknown author. section 11.1

Authorship identification

Each known book becomes an object with an author label and a signature of writing features. A mystery book supplies new features for an author prediction. section 11.8

How Learn AI-Assisted Python Programming, Second Edition covers it

How deep it goes
Defines labeled training data, feature calculation, learning, and prediction, but does not detail model internals.
Examples
Uses book texts, authors, average word length, average words per sentence, and sentence complexity.
What you can do after
Apply labeled examples and calculated features to predict the author of a previously unseen book.
How it connects
Connects machine learning with artificial intelligence, training data, features, labels, and prediction.

Also explained in

Compare how 19 books explain supervised learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn AI-Assisted Python Programming, Second Edition. The section links point to the parts of the book it draws on.