stargazer-predict

0.0.12 • Public • Published

stargazer-predict

This project goal is to be used as a NPM module internally at Stargazer to compute statistics. So far it is used in the batch and api repos. We decided to put some features in a dedicated module instead of the models repo mainly because of the size of the require sub-modules. We are using the node version of Tensorflow under the hood.

Model

We determined that the trend of the statistics (view count, comment count...) of a video looks like an equation of the following form: y = k * ln(x+1) where

  • x is the number of hours since the video has been published
  • y is the number of views, comments, or likes...
  • k is the coefficient to determine for every video

The idea is to look at multiple videos of an influencer at different time to determine coefficients for every video, and then compute an average of these coefficients. We usually remove the "outliers" data, the video that are not in the usual range of performance of the influencers For example, when a video of an influencer become viral, up to 10 times what s/he usually performs, we would discard this video because most likely s/he won't get the same performance again.

Tensorflow helps us build this model very quicky based on the different snapshots we gathered from the social medias API.

Deployment

We are using the same deploy shell script than the stargazer lib module. After running yarn deploy, it will:

  • deploy the project to the NPM registry
  • upgrade the package within api and push the change to master
  • upgrade the package within batch and push the change to master

Feel free to check the deploy.sh file for more details.

The project that contains this module needs to run on a docker image that runs python

Readme

Keywords

none

Package Sidebar

Install

npm i stargazer-predict

Weekly Downloads

0

Version

0.0.12

License

MIT

Unpacked Size

135 kB

Total Files

9

Last publish

Collaborators

  • stargazer_tech