revise janitor trial report
This commit is contained in:
@@ -19,10 +19,6 @@ module Reports
|
||||
@approval_count ||= Post.where("approver_id = ? and created_at >= ?", user.id, since).count
|
||||
end
|
||||
|
||||
def deleted_count
|
||||
Post.where("approver_id = ? and created_at >= ? and is_deleted = true", user.id, since).count
|
||||
end
|
||||
|
||||
def percentile_25_score
|
||||
ActiveRecord::Base.select_value_sql("select percentile_cont(0.25) within group (order by score) from posts where created_at >= ? and approver_id = ?", since, user.id).to_i
|
||||
end
|
||||
@@ -31,10 +27,10 @@ module Reports
|
||||
ActiveRecord::Base.select_value_sql("select percentile_cont(0.50) within group (order by score) from posts where created_at >= ? and approver_id = ?", since, user.id).to_i
|
||||
end
|
||||
|
||||
def confidence_interval
|
||||
hits = Post.where("approver_id = ? and created_at >= ? and score >= 3", user.id, since).count
|
||||
def deletion_confidence
|
||||
hits = Post.where("approver_id = ? and created_at >= ? and is_deleted = true", user.id, since).count
|
||||
total = Post.where("approver_id = ? and created_at >= ?", user.id, since).count
|
||||
Reports::UserPromotions.ci_lower_bound(hits, total, 0.95)
|
||||
Reports::UserPromotions.ci_lower_bound(hits, total, 0.95).to_i
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user