improvements to jerk detector

This commit is contained in:
Kyle Drake 2024-04-16 17:28:31 -05:00
parent ca288fcd8b
commit 5a936a599c

View file

@ -628,8 +628,12 @@ class Site < Sequel::Model
end end
def is_a_jerk? def is_a_jerk?
blocks_dataset_count = blocks_dataset.count blocks_count = blocks_dataset.count
blocks_dataset_count >= BLOCK_JERK_THRESHOLD && ((blocks_dataset_count / follows_dataset.count.to_f) * 100) > BLOCK_JERK_PERCENTAGE blockings_count = blockings_dataset.count
follows_count = follows_dataset.count
return true if blocks_count > BLOCK_JERK_THRESHOLD * 2
return true if blockings_count > BLOCK_JERK_THRESHOLD * 4
blocks_count >= BLOCK_JERK_THRESHOLD && ((blocks_count / follows_count.to_f) * 100) > BLOCK_JERK_PERCENTAGE && blocks_count > 60
end end
def blocking_site_ids def blocking_site_ids