In [1]:
entity_views_and_edits <- read.table("../results/sql_queries/entity_views_and_aggregated_revisions/entity_views_and_aggregated_revisions_and_quality_scoring_20170701.tsv", header=FALSE, sep="\t")

In [2]:
colnames(entity_views_and_edits) <- c('entity_id','number_of_revisions', 'page_views', 'prediction')

In [3]:
summary(entity_views_and_edits)


    entity_id        number_of_revisions   page_views        prediction  
 Q1      :       1   Min.   :    1.0     Min.   :0.000e+00   A:    3969  
 Q100    :       1   1st Qu.:    6.0     1st Qu.:1.300e+01   B:  500819  
 Q1000   :       1   Median :   13.0     Median :1.370e+02   C: 5429662  
 Q10000  :       1   Mean   :   17.9     Mean   :2.461e+04   D: 4472790  
 Q100000 :       1   3rd Qu.:   23.0     3rd Qu.:1.000e+03   E:11743883  
 Q1000000:       1   Max.   :21863.0     Max.   :1.253e+10               
 (Other) :22151117                                                       

In [4]:
head(entity_views_and_edits, n=100)


entity_idnumber_of_revisionspage_viewsprediction
Q1000999 33 736 C
Q1001536411 1 E
Q10018576 9 21 E
Q1002034824 11 E
Q1002083211 12 E
Q1002822013 6 E
Q1002897010 20 E
Q1003049611 85 E
Q1003187610 23 E
Q1003426610 223 E
Q1004037815 0 E
Q1004062010 9 E
Q1004252 14 127383 C
Q1004303011 69 E
Q1004612815 9 E
Q1004669619 257 E
Q1005613610 167 E
Q1006390211 11 E
Q1006914014 0 C
Q1006979916 9 E
Q1007091615 28 E
Q1007145710 7 E
Q1007972615 47 E
Q1008025012 3 E
Q1008169516 0 C
Q1008691510 43 E
Q1008756717 9 E
Q1008807 10 1173 E
Q1008885221 192 D
Q1008917511 16 E
Q10178174 12 2 E
Q10179539 12 21 E
Q10180230 12 0 E
Q10185035 12 0 E
Q10185630 17 5 E
Q10189748 11 14 E
Q10190125 14 1 E
Q10191117 12 69 E
Q10193419 16 2 E
Q10197467 10 5 E
Q10199156 12 3878 E
Q10201621 12 235 E
Q1020294 15 289 D
Q10203058 12 42 E
Q10205202 15 0 E
Q1020522 116 37032 B
Q10206574 14 10 E
Q10210050 9 13 E
Q10213854 13 52 E
Q10214898 10 6 E
Q10218644 10 27 E
Q10220002 16 295242 C
Q10222472 10 12 E
Q10227947 12 544 E
Q10230571 10 13 E
Q10231920 46 2167 C
Q10233668 8 21 E
Q10234157 18 40 E
Q10235491 11 22 E
Q10235772 11 33 E

In [5]:
cor(entity_views_and_edits$page_views,entity_views_and_edits$number_of_revisions, method="spearman")


0.184581139220765

In [6]:
entity_views_and_edits_model <- lm(entity_views_and_edits$page_views ~ entity_views_and_edits$number_of_revisions)

In [7]:
summary(entity_views_and_edits_model)


Call:
lm(formula = entity_views_and_edits$page_views ~ entity_views_and_edits$number_of_revisions)

Residuals:
       Min         1Q     Median         3Q        Max 
-2.051e+08 -6.302e+04  3.079e+04  9.651e+04  1.251e+10 

Coefficients:
                                             Estimate Std. Error t value
(Intercept)                                -143454.88    1532.40  -93.61
entity_views_and_edits$number_of_revisions    9388.76      54.26  173.05
                                           Pr(>|t|)    
(Intercept)                                  <2e-16 ***
entity_views_and_edits$number_of_revisions   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 5579000 on 22151121 degrees of freedom
Multiple R-squared:  0.00135,	Adjusted R-squared:  0.00135 
F-statistic: 2.995e+04 on 1 and 22151121 DF,  p-value: < 2.2e-16

In [ ]:


In [ ]: