liveBook · Manning

Feature extraction

As explained in Graph Algorithms for Data Science

Feature extraction is the process of identifying and deriving attributes that represent relevant characteristics of data points or graph nodes.

Feature extraction identifies and derives attributes that represent relevant characteristics of data points or graph nodes. In a user graph, extracted features become node properties that describe behavior and support later comparison. section 8.0 section 8.1

A practical user-segmentation workflow extracts behavioral features such as:

  • tweetCount: the number of tweets published by each user, including users with zero tweets. section 8.1
  • retweetRatio: retweets divided by the sum of retweets and tweets, using zero when both counts are absent. section 8.1
  • timeToRetweet: the average duration in minutes between publishing a tweet and retweeting it, using 372 minutes for users who never retweeted. section 8.1

Measuring retweet delay

A Cypher query matches users, retweets, and original tweets; calculates duration.between(tweet.createdAt, retweet.createdAt); averages each user's delays; and returns distribution statistics. Very short, repeated delays can help identify likely bots, while the observed average for ordinary users is around six hours. section 8.1

After extraction, feature vectors can be compared with pairwise cosine similarity to create a network whose links connect similar users. Community detection can then reveal user segments without predefining their number; network density influences cluster size. section 8.0

How Graph Algorithms for Data Science covers it

How deep it goes
Implements counts, ratios, and temporal averages with missing-data defaults, but stops before constructing the similarity network.
Examples
Uses tweet counts, retweet ratios, retweet delays, distribution statistics, and bot-oriented behavioral interpretation.
What it assumes
Assumes Cypher knowledge and graph data containing users, tweets, retweets, and timestamps.
What you can do after
Build it from scratch by calculating and storing behavioral node properties with Cypher.
How it connects
Connects node properties with cosine similarity, similarity networks, community detection, and user segmentation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.