View source: R/tweetfunctions.R
pred.cascade | R Documentation |
Predict the popularity of information cascade
pred.cascade( p.time, infectiousness, share.time, degree, n.star = 100, features.return = FALSE )
p.time |
equally spaced vector of time to estimate the infectiousness, p.time[1]=0 |
infectiousness |
a vector of estimated infectiousness, returned by |
share.time |
observed resharing times, sorted, share.time[1] =0 |
degree |
observed node degrees |
n.star |
the average node degree in the social network |
features.return |
if TRUE, returns a matrix of features to be used to further calibrate the prediction |
a vector of predicted populatiry at each time in p.time
.
data(tweet) pred.time <- seq(0, 6 * 60 * 60, by = 60) infectiousness <- get.infectiousness(tweet[, 1], tweet[, 2], pred.time) pred <- pred.cascade(pred.time, infectiousness$infectiousness, tweet[, 1], tweet[, 2], n.star = 100) plot(pred.time, pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.