stargazer-predict v0.0.12
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
xis the number of hours since the video has been publishedyis the number of views, comments, or likes...kis 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
apiand push the change to master - upgrade the package within
batchand 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