Update README.md
Browse files
README.md
CHANGED
|
@@ -1,83 +1,93 @@
|
|
| 1 |
---
|
| 2 |
-
title: Cultural Exposure Risk
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
-
|
| 10 |
---
|
| 11 |
-
# Cultural Exposure & Algorithmic Risk (CEAR) Baseline v1.0
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
3. **Platform Diversity Index (D-Index):** Measures the concentration/spread of usage across platforms (using $1/\text{HHI}$).
|
| 24 |
-
4. **Cultural Efficiency:** Per-platform estimates of C-Score gained per minute spent.
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
The model is defined by transparent assumptions encoded in the Python code (`cear_model.py`) and the platform weights (`platform_weights.json`).
|
| 29 |
-
|
| 30 |
-
### Core Formulas
|
| 31 |
-
|
| 32 |
-
The key to the C-Score is the **Diminishing Returns Function** ($f_{DR}$), which prevents the C-Score from increasing linearly with time, acknowledging that the first hour is likely more valuable than the tenth.
|
| 33 |
-
|
| 34 |
-
$$f_{DR}(\text{Min}) = \log_{10}(\text{Min} + 1)$$
|
| 35 |
-
|
| 36 |
-
The final scores are calculated as:
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
import pandas as pd
|
| 54 |
-
from cear_model import CEARModel
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
| 62 |
|
| 63 |
-
|
| 64 |
-
results = model.calculate_scores(user_data)
|
| 65 |
-
# {'C_Score': 3.75, 'A_Risk': 565.0, ...}
|
| 66 |
|
| 67 |
-
|
|
|
|
| 68 |
|
| 69 |
-
|
| 70 |
|
| 71 |
-
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
|
| 78 |
|
| 79 |
-
|
| 80 |
|
| 81 |
-
|
| 82 |
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CEAR – Cultural Exposure & Algorithmic Risk Analyzer
|
| 3 |
+
emoji: 📡
|
| 4 |
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.0.0
|
| 8 |
app_file: app.py
|
| 9 |
+
license: mit
|
| 10 |
---
|
|
|
|
| 11 |
|
| 12 |
+
# CEAR – Cultural Exposure & Algorithmic Risk Analyzer
|
| 13 |
|
| 14 |
+
CEAR is an **analytic, rule-based model** and interactive Gradio app that helps you reason about your social media habits along three axes:
|
| 15 |
|
| 16 |
+
- **Cultural Connectedness (C-Score)** – how much “trend exposure” your habits plausibly give you
|
| 17 |
+
- **Algorithmic Risk (A-Risk)** – how much raw attention you hand over to algorithmic feeds
|
| 18 |
+
- **Diversity Index (D-Index)** – how many platforms you meaningfully use, adjusted for concentration
|
| 19 |
|
| 20 |
+
This is **not** a predictive deep learning model. It is a transparent scoring scheme designed to surface patterns in how you allocate attention across platforms.
|
| 21 |
|
| 22 |
+
The live app runs here:
|
| 23 |
+
> `https://huggingface.co/spaces/<your-username>/CEAR`
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
## 👤 What the app does
|
| 28 |
|
| 29 |
+
Given your **weekly screen time per platform**, a **per-platform variety rating**, and two **global self-reports** (satisfaction and FOMO), CEAR:
|
| 30 |
|
| 31 |
+
1. Builds a structured profile of your social media usage.
|
| 32 |
+
2. Computes three core scores:
|
| 33 |
+
- **C-Score** – log-scaled, weight-adjusted trend exposure
|
| 34 |
+
- **A-Risk** – linear, weight-adjusted attention risk
|
| 35 |
+
- **D-Index** – inverse Herfindahl index over your time share
|
| 36 |
+
3. Ranks platforms by **Cultural Efficiency** (0–100):
|
| 37 |
+
> “How much cultural exposure you get per minute” relative to your own most efficient platform.
|
| 38 |
+
4. Generates a **plain-language interpretation** tying all of this back to your satisfaction and FOMO.
|
| 39 |
|
| 40 |
+
It does **not** claim to tell you what is “objectively healthy” or what you “must” do. It gives you a structured mirror to look at your own media diet.
|
| 41 |
|
| 42 |
+
---
|
| 43 |
|
| 44 |
+
## 🧮 Model description
|
| 45 |
|
| 46 |
+
### Inputs
|
| 47 |
|
| 48 |
+
The app currently supports 7 platform buckets:
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
- TikTok
|
| 51 |
+
- Instagram
|
| 52 |
+
- YouTube
|
| 53 |
+
- Twitter / X
|
| 54 |
+
- Reddit
|
| 55 |
+
- Facebook
|
| 56 |
+
- Other (anything else you use)
|
| 57 |
|
| 58 |
+
For each platform, you provide:
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
- `minutes_per_week` (number)
|
| 61 |
+
- `variety_score` (slider, 0–10)
|
| 62 |
|
| 63 |
+
Global self-report sliders:
|
| 64 |
|
| 65 |
+
- `feed_satisfaction` (0–10) – “How happy are you with your feed overall?��
|
| 66 |
+
- `fomo_level` (0–10) – “How out of the loop do you feel about online culture?”
|
| 67 |
|
| 68 |
+
### Input rules and validation
|
| 69 |
|
| 70 |
+
- **Minutes must be ≥ 0.** Negative values are treated as 0.
|
| 71 |
+
- If `minutes_per_week == 0` for a platform:
|
| 72 |
+
- That platform is **excluded** from the model calculations.
|
| 73 |
+
- Its variety value is **ignored**.
|
| 74 |
+
- If you set `variety_score > 0` while `minutes_per_week == 0`:
|
| 75 |
+
- The app **ignores** that variety score.
|
| 76 |
+
- You get a ⚠️ **warning line** listing affected platforms in the summary.
|
| 77 |
|
| 78 |
+
This keeps the math honest: variety only matters where you actually spend time.
|
| 79 |
|
| 80 |
+
### Internals – how the scores are computed
|
| 81 |
|
| 82 |
+
Platform weights live in `platform_weights.json` and look like:
|
| 83 |
|
| 84 |
+
```json
|
| 85 |
+
{
|
| 86 |
+
"tiktok": {"W_C": 0.95, "W_A": 0.90},
|
| 87 |
+
"instagram":{"W_C": 0.85, "W_A": 0.85},
|
| 88 |
+
"youtube": {"W_C": 0.70, "W_A": 0.75},
|
| 89 |
+
"twitter": {"W_C": 0.80, "W_A": 0.70},
|
| 90 |
+
"facebook": {"W_C": 0.50, "W_A": 0.60},
|
| 91 |
+
"reddit": {"W_C": 0.60, "W_A": 0.40},
|
| 92 |
+
"other": {"W_C": 0.10, "W_A": 0.20}
|
| 93 |
+
}
|