File size: 4,144 Bytes
b2c5443 87cdc48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
---
title: Cultural Exposure and Algorithmic Risk Model
emoji: "🧭"
colorFrom: "blue"
colorTo: "green"
sdk: gradio # THIS IS THE CRITICAL LINE
app_file: app.py
---
# Cultural Exposure & Algorithmic Risk (CEAR) Baseline v1.0
## Model Description
The **Cultural Exposure & Algorithmic Risk (CEAR) Model** is an **analytic, rule-based scoring system** designed to help users and researchers interpret social media usage in terms of its potential impact on cultural awareness and algorithmic vulnerability.
This version is a V1 Baseline: it is **deterministic** (theory-driven by fixed rules and weights) and does not rely on supervised machine learning or proprietary user data.
### 🎯 Key Outputs
1. **Cultural Connectedness Score (C-Score):** Estimates exposure to viral and trending content, modeled with diminishing returns on time.
2. **Algorithmic Risk Score (A-Risk):** Quantifies vulnerability incurred from concentrated time on high-intensity, opaque algorithmic feeds.
3. **Platform Diversity Index (D-Index):** Measures the concentration/spread of usage across platforms (using $1/\text{HHI}$).
4. **Cultural Efficiency:** Per-platform estimates of C-Score gained per minute spent.
## ⚙️ Analytic Basis & Scoring Logic
The model is defined by transparent assumptions encoded in the Python code (`cear_model.py`) and the platform weights (`platform_weights.json`).
### Core Formulas
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.
$$f_{DR}(\text{Min}) = \log_{10}(\text{Min} + 1)$$
The final scores are calculated as:
$$C_{Score} = \sum_{i} \left[ W_{C,i} \times f_{DR}(\text{Min}_i) \right]$$
$$A_{Risk} = \sum_{i} \left[ W_{A,i} \times \text{Min}_i \right]$$
*(Where $W_{C}$ is the Trend Density Weight and $W_{A}$ is the Algorithmic Risk Weight, defined in `platform_weights.json`.)*
## 🚀 Deployment & Usage (Hugging Face Space)
This repository contains the core logic (`cear_model.py`) and the application interface (`app.py`) for a Hugging Face Space.
### Model Integration (The Engine)
The core logic can be imported and run in any environment:
```python
import pandas as pd
from cear_model import CEARModel
# Example Input Data
user_data = pd.DataFrame([
{'platform_name': 'TikTok', 'minutes_per_week': 450},
{'platform_name': 'YouTube', 'minutes_per_week': 200},
{'platform_name': 'Reddit', 'minutes_per_week': 50},
])
model = CEARModel()
results = model.calculate_scores(user_data)
# {'C_Score': 3.75, 'A_Risk': 565.0, ...}
# Application Interface (The App - app.py)
The app.py script uses the Gradio library to create an interactive web interface. It handles:
Collecting user input via a table component.
Calling the CEARModel.calculate_scores() method.
Generating a qualitative natural language summary based on the quadrant of the C-Score and A-Risk (e.g., "High C, Low A").
⚠️ Limitations and Ethical Considerations
1. Theoretical, Not Validated: The scores are based on fixed, theoretical assumptions about platform design. They are not calibrated against real-world user survey data or outcomes (e.g., actual cultural literacy, actual regret). Scores are relative estimates only.
2. No Content Analysis: The model only uses time and platform. It cannot distinguish between a productive hour watching educational content and an unproductive hour scrolling low-quality content.
3. Future Work: This deterministic model serves as a foundation. Future versions are intended to use the same input schema to train supervised machine learning models that directly predict outcomes (e.g., predicting user-reported "felt caught up" or "post-scroll regret").
---
## 2. `requirements.txt` (For Deployment)
This file lists the necessary Python packages for the Gradio Space to run your model and interface correctly.
```text
# requirements.txt
# Core Model Dependencies
pandas
numpy
# Gradio Space Dependencies
# Gradio is used to build the simple web application interface (app.py)
gradio |