data science project to predict instagram likes based on post characteristics — caption length, hashtag count, posting time, follower count, image brightness, face detection. collected data from 500 posts across 50 accounts, engineered features, trained a random forest. the algorithm isn't as mysterious as instagram wants you to think.
the biggest predictor wasn't any single feature — it was the interaction between posting time and hashtag count. posts between 6-9pm with 11-15 hashtags outperformed everything else by a significant margin. the algorithm rewards consistency and engagement velocity in the first 30 minutes. if your post gets engagement quickly, the algorithm shows it to more people. if it doesn't, it buries it.
the feature importance ranking was illuminating: posting time (23%), hashtag count (18%), caption length (14%), follower count (12%), image brightness (9%), day of week (8%), face detection (7%), remaining features (9%). the thing that surprised me was image brightness — brighter images consistently outperformed darker ones. probably because they stand out in the feed scroll. the algorithm doesn't care about aesthetics. it cares about stopping the scroll.
the model hit 82% accuracy on held-out data which sounds impressive until you realize that just predicting "mean likes for this account" gets you 70%. the 12% improvement is real but it's not magic. the algorithm is a recommendation system optimized for time-on-platform. it shows posts that get engagement because engagement keeps people scrolling. understanding that one fact explains 80% of its behavior.