2023-12-06

PROPOSAL SUMMARY

Problem Description: This project delves into YouTube data to analyze evolving user habits and preferences. Emphasizing data visualization, it explores trends in likes, comments, and viewership. The main objective is to assist content creators in improving their videos and predicting the likelihood of a video becoming “trending” based on the ‘view_velocity’ attribute.

Data source: Primary Source of Data is extracted using below YouTube Data API v3. Secondary data source is taken from Kaggle.

API Source: https://youtube.googleapis.com/youtube/v3/.

Strategy for Analytics:

  • The project involved cleaning data, exploring and modelling (through H2o library) with respect to target variable.

  • Applied visualization tools for insights.

  • Random Forest and GBM (Gradient Boosting Machine Learning Algorithm) were employed for the prediction.

Evaluation Plan:

  • The calculated MSE and R2 values are printed for assessing the accuracy and goodness of fit of the model.

  • A variable importance plot is generated using h2o.varimp_plot to visualize the importance of each feature in predicting “view_velocity.”

SUMMARY OF PEER COMMENTS

  • Extract from YouTube videos using the YouTube API for textual analysis: We found from our Exploratory Data Analysis that “Official” is the most occuring word in the title youtube videos.

  • Usage of Statistical metrics and demonstration: Calculated MSE and R2 values printed for assessing the accuracy and goodness of fit of the model. Also, a variable importance plot is generated using h2o.varimp_plot to visualize the importance of each feature in predicting “view_velocity.”

DATA SUMMARY, EXPLORATION AND DISCUSSION

Predictors: “video_id”, “trending_date”, “title_clean”, “channel_title”, “category_id”, “published_date”, “tag_1”, “tag_2”, “tag_3”, “tag_4”, “tag_5”, “tag_6”, “comment_view_ratio”, “days_since_publication”, “likes_per_day”, “comments_per_day”, “tag_10”, “views”, “likes”, “comment_count”, “description”

Target variable: “view_velocity” which is obtained by dividing number of views by (difference between today’s date and published date of video). Trending date is the next date when video is uploaded.

We considered the following plots for exploratory data analysis with respect to the subsets of most significant feature & numerical variables:

  • CORRELATION HEATMAP OF NUMERICAL VALUE COLUMNS

  • OCCURRENCE OF WORDS IN VIDEO TITLES

  • TRENDING VIDEOS BY CATEGORIES

  • VIEWS OF TRENDING VIDEOS

  • TRENDING VIDEOS BY CHANNEL

  • CATEGORIES OF TOP 10 CHANNELS WITH MOST TRENDING VIDEOS

CORRELATION HEATMAP OF NUMERICAL VALUE COLUMNS

OCCURRENCE OF WORDS IN VIDEO TITLES

TRENDING VIDEOS BY CATEGORIES

VIEWS OF TRENDING VIDEOS

TRENDING VIDEOS BY CHANNEL

CATEGORIES OF TOP 10 CHANNELS WITH MOST TRENDING VIDEOS

Random Forest Regression Model using H2O

Here’s a description of the AI/ML procedures and results:

Target Variable Definition: The target variable for prediction is set as “view_velocity.”

Model Building: A Random Forest regression model (rf_model) is built using the specified features (features) and the target variable. The model is trained on the training dataset (train).

Model Evaluation: The model’s performance is evaluated on a separate test dataset (test) using the h2o.performance function, and the results are stored in rf_perf.

Mean Squared Error (MSE) Calculation: The Mean Squared Error (MSE) is calculated using the h2o.mse function based on the model’s performance on the test set.

R-squared (R2) Calculation: The R-squared (R2) metric is calculated using the h2o.r2 function based on the model’s performance on the test set.

Results Display: The calculated MSE and R2 values are printed for assessing the accuracy and goodness of fit of the model.

Variable Importance Plot: A variable importance plot is generated using h2o.varimp_plot to visualize the importance of each feature in predicting “view_velocity.”

Gradient Boosting Machine Learning Algorithm using H2O

Here’s a description of the AI/ML procedures and results:

Model Type: GBM with 100 trees and a maximum depth of 5 levels.

Mean Leaves: On average, trees have approximately 22.71 leaves.

Model Performance MSE: 1.25e-05, RMSE: 0.00354, MAE: 0.00206, RMSLE: 0.00229

Validation Metrics: Slightly higher RMSE (0.00533) and MAE (0.00289) on unseen data.

Scoring History: As the number of trees increases, RMSE and MAE generally decrease, indicating learning from data.

Top Features: views, published_date, and trending_date are most important.

Lesser Importance Features: likes, tag_5, comments_per_day, etc.

Model Fit: Low MSE, RMSE, and MAE suggest a good fit to training data.

Overfitting Check: Small differences between training and validation metrics indicate minimal overfitting.

Feature Relevance: High importance of views and published_date.

Model Complexity: The model is relatively complex; consider adjustments if overfitting is a concern.

KEY TAKEAWAYS

  • We found that “Music category” is the most trending category on youtube.
  • “Official” is the most occuring word in the title youtube videos.
  • “view_velocity” which is obtained by dividing number of views by (difference between today’s date and published date of video). Trending date is the next date when video is uploaded.

CONCLUSION