In [19]:
library(dplyr)
In [20]:
quality_prediction_and_page_views <- read.table("../results/sql_queries/entity_views_and_aggregated_revisions/entity_views_and_aggregated_revisions_and_quality_scoring_prediction_converted_20130701.tsv", header=FALSE, sep="\t")
In [21]:
colnames(quality_prediction_and_page_views) <- c('entity_id','number_of_revisions', 'page_views', 'prediction', 'ordinal_score')
In [22]:
head(quality_prediction_and_page_views)
In [23]:
cor(quality_prediction_and_page_views$page_views,quality_prediction_and_page_views$ordinal_score, method="spearman")
In [24]:
quality_prediction_and_page_views_model <- lm(quality_prediction_and_page_views$page_views ~ quality_prediction_and_page_views$ordinal_score)
In [25]:
summary(quality_prediction_and_page_views_model)
In [26]:
class_a_quality_prediction_and_page_views <- filter(quality_prediction_and_page_views, prediction=="A")
In [27]:
sorted_ascend_class_a_quality_prediction_and_page_views <- dplyr::arrange(class_a_quality_prediction_and_page_views, page_views)
In [28]:
head(sorted_ascend_class_a_quality_prediction_and_page_views, n=10)
In [ ]:
In [29]:
class_e_quality_prediction_and_page_views <- filter(quality_prediction_and_page_views, prediction=="E")
In [30]:
sorted_desc_class_e_quality_prediction_and_page_views <- dplyr::arrange(class_e_quality_prediction_and_page_views, desc(page_views))
In [31]:
head(sorted_desc_class_e_quality_prediction_and_page_views, n=10)
In [32]:
nrow(class_e_quality_prediction_and_page_views)
In [33]:
nrow(filter(quality_prediction_and_page_views, prediction=="D"))
In [34]:
nrow(filter(quality_prediction_and_page_views, prediction=="C"))
In [35]:
nrow(filter(quality_prediction_and_page_views, prediction=="B"))
In [36]:
nrow(filter(quality_prediction_and_page_views, prediction=="A"))
In [ ]: