Keyword Analytics Calculations

Overview

This page provides a detailed mathematical explanation of the metrics used in the keyword analytics dashboard. Each metric is calculated based on data aggregated from video metadata, including views, durations, and keyword associations. The calculations aim to quantify keyword performance, relevance, and potential impact in the context of the adult industry.

1. Frequency

The frequency of a keyword is the number of times it appears across all videos in the dataset. It is a measure of how commonly a keyword is used in video titles or tags.

\[\text{Frequency}(k) = \sum_{v \in V} \mathbb{1}_{\{k \in \text{keywords}(v)\}}\]

Where \( V \) is the set of all videos, \( k \) is the keyword, and \( \mathbb{1} \) is the indicator function that equals 1 if the keyword is associated with the video, 0 otherwise.

2. Phrase Length

Phrase length is the number of words in a keyword phrase, reflecting its complexity or specificity.

\[\text{Phrase Length}(k) = |\text{words}(k)|\]

Where \( \text{words}(k) \) is the set of words in the keyword phrase after splitting on whitespace.

3. Total Views

Total views for a keyword is the sum of views across all videos associated with that keyword, indicating its overall popularity.

\[\text{Total Views}(k) = \sum_{v \in V_k} \text{Views}(v)\]

Where \( V_k \subseteq V \) is the subset of videos containing keyword \( k \), and \( \text{Views}(v) \) is the view count of video \( v \).

4. Mean Views

Mean views is the average number of views per video for a keyword, providing insight into the average engagement per video.

\[\text{Mean Views}(k) = \frac{\text{Total Views}(k)}{\text{Frequency}(k)}\]

Where \( \text{Frequency}(k) > 0 \); otherwise, set to 0.

5. Average Duration (Minutes)

Average duration is the mean length of videos associated with a keyword, converted to minutes, reflecting typical content length.

\[\text{Avg Duration}(k) = \frac{1}{\text{Frequency}(k)} \sum_{v \in V_k} \frac{\text{Duration}(v)}{60}\]

Where \( \text{Duration}(v) \) is the duration of video \( v \) in seconds, and division by 60 converts to minutes.

6. Standard Deviation

Standard deviation measures the variability of views among videos associated with a keyword, indicating consistency in view counts.

\[\text{Std Dev}(k) = \sqrt{\frac{1}{\text{Frequency}(k)} \sum_{v \in V_k} (\text{Views}(v) - \text{Mean Views}(k))^2}\]

If \( \text{Frequency}(k) = 0 \) or variance is 0, set to 1 to avoid division by zero in subsequent calculations.

7. Specificity Score

The specificity score quantifies how unique a keyword is relative to the total number of videos, using a logarithmic ratio to dampen extreme values.

\[\text{Specificity Score}(k) = \frac{\log(\text{Frequency}(k) + 1)}{\log(|V| + 1)}\]

Where \( |V| \) is the total number of videos. The \( +1 \) terms prevent undefined logarithms for zero frequencies or empty datasets.

8. View Consistency

View consistency measures how stable the views are for a keyword, calculated as the inverse of the coefficient of variation.

\[\text{View Consistency}(k) = \frac{1}{1 + \frac{\text{Std Dev}(k)}{\text{Mean Views}(k)}}\]

If \( \text{Mean Views}(k) = 0 \), set to 0. This ensures values range from 0 (highly variable) to 1 (highly consistent).

9. Industry Boost

Industry boost enhances the score of keywords containing specific industry-relevant terms, adding a fixed increment per matching term.

\[\text{Industry Boost}(k) = 1 + \sum_{w \in \text{Boost Words}} 0.5 \cdot \mathbb{1}_{\{w \in \text{words}(k)\}}\]

Where \( \text{Boost Words} \) is a predefined set of industry-specific terms, and each match contributes 0.5 to the boost.

10. Momentum Score

Momentum score is a composite metric that combines normalized frequency, logarithmic views, phrase length boost, view consistency, industry boost, and specificity to rank keyword potential.

\[\text{Momentum Score}(k) = \frac{\left( \frac{\text{Frequency}(k)}{|V|} \right) \cdot \log(\text{Total Views}(k) + 1) \cdot (\text{Phrase Length}(k))^{1.5} \cdot \text{View Consistency}(k) \cdot \text{Industry Boost}(k)}{1 + \text{Specificity Score}(k)}\]

Where:

  • \( \frac{\text{Frequency}(k)}{|V|} \): Normalizes frequency by total videos.
  • \( \log(\text{Total Views}(k) + 1) \): Logarithmic scaling of views to reduce the impact of outliers.
  • \( (\text{Phrase Length}(k))^{1.5} \): Amplifies the score for longer, more specific phrases.
  • Denominator \( 1 + \text{Specificity Score}(k) \): Penalizes overly common keywords.

Interactive Visualization

The following chart illustrates the relationship between Specificity Score and Momentum Score for a sample set of keywords. Hover over data points to view keyword details.