Changes between Version 3 and Version 4 of BuildPopularity


Ignore:
Timestamp:
01/29/26 16:48:38 (10 days ago)
Author:
233194
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildPopularity

    v3 v4  
    7676{{{
    7777price_tier_builds =
    78   π_{b.id ⇒ build_id, b.total_price,
     78  π_{b.id ⇒ build_id, b.user_id,
     79     b.total_price,
    7980     CASE
    8081       WHEN b.total_price < 500 THEN 'Budget'
     
    8788  )
    8889
     90favorites =
     91  γ_{build_id;
     92     COUNT(DISTINCT user_id) ⇒ favorites_count
     93  } (favorite_build)
     94
    8995engagement_stats =
    90   γ_{price_tier;
    91      COUNT(build_id) ⇒ builds_count,
    92      AVG(favorites_count) ⇒ avg_favorites,
     96  γ_{ptb.price_tier;
     97     COUNT(DISTINCT ptb.build_id) ⇒ builds_count,
     98     AVG(COALESCE(f.favorites_count, 0)) ⇒ avg_favorites,
    9399     AVG(rb.value) ⇒ avg_rating,
    94      COUNT(DISTINCT user_id) ⇒ unique_builders
     100     COUNT(DISTINCT ptb.user_id) ⇒ unique_builders
    95101  } (
    96     price_tier_builds ⋈_{price_tier_builds.build_id = rb.build_id} rating_build rb
    97     ⋈_{rb.build_id = b.id} build b
     102    price_tier_builds ptb
     103    ⟕_{ptb.build_id = rb.build_id} rating_build rb
     104    ⟕_{ptb.build_id = f.build_id} favorites f
    98105  )
    99106
    100107λ_15 (
    101   τ_{(builds_count * 2) + (avg_favorites * 3) + (avg_rating * 10) + (unique_builders * 1.5) DESC} (
     108  τ_{engagement_score DESC} (
    102109    π_{e.price_tier,
    103110       e.builds_count,
    104        e.avg_favorites,
    105        ROUND(e.avg_rating, 2) ⇒ avg_rating,
     111       ROUND(e.avg_favorites, 1) ⇒ avg_favorites,
     112       ROUND(COALESCE(e.avg_rating, 0), 2) ⇒ avg_rating,
    106113       e.unique_builders,
    107        (e.builds_count * 2 + e.avg_favorites * 3 + e.avg_rating * 10 + e.unique_builders * 1.5) ⇒ engagement_score
     114       ROUND((e.builds_count * 2 + e.avg_favorites * 3 + COALESCE(e.avg_rating, 0) * 10 + e.unique_builders * 1.5), 2) ⇒ engagement_score
    108115    } (engagement_stats e)
    109116  )