File size: 3,117 Bytes
8aa6232
 
 
 
 
 
 
 
 
 
 
 
161e82d
 
 
8aa6232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
language: en
datasets:
- adilshamim8/social-media-addiction-vs-relationships
tags:
- tabular-data
- scikit-learn
- random-forest
- classification
- addiction
- social-media
- Linkspreed
- Web4
- Social Networks as a Service
model-index:
- name: LS-W4-Mini-RF_Addiction_Impact
  results:
  - task:
      name: Tabular Classification
      type: tabular-classification
    dataset:
      name: Students Social Media Addiction
      type: adilshamim8/social-media-addiction-vs-relationships
    metrics:
      - name: Accuracy
        type: accuracy
        value: 0.93
---

# LS-W4-Mini-RF_Addiction_Impact

## Model Summary

This is a **Random Forest Classifier** trained to predict whether social media use affects a student's academic performance. The model is based on the "Social Media Addiction vs. Relationships" dataset from Kaggle, which contains survey responses from students aged 16 to 25.

## Usage

The model is packaged within a scikit-learn pipeline and can be easily loaded and used within any Python environment. It expects a pandas DataFrame with the same column structure as the original training data.

```python
import joblib
import pandas as pd

# Load the model
model = joblib.load('LS-W4-Mini-RF_Addiction_Impact.joblib')

# Example of new data to predict on
new_data = pd.DataFrame({
    'Gender': ['Female'],
    'Academic_Level': ['Undergraduate'],
    'Most_Used_Platform': ['Instagram'],
    'Relationship_Status': ['Single'],
    'Age': [20],
    'Avg_Daily_Usage_Hours': [5.0],
    'Sleep_Hours_Per_Night': [6],
    'Mental_Health_Score': [7],
    'Addicted_Score': [8],
    'Conflicts_Over_Social_Media': [0]
})

# Make a prediction
prediction = model.predict(new_data)
print("Prediction (1 = Yes, 0 = No):", prediction)

```

## Training Data

The model was trained on the public dataset **[Social Media Addiction vs. Relationships](https://www.kaggle.com/datasets/adilshamim8/social-media-addiction-vs-relationships/data)**. The dataset consists of 705 records and 13 features with survey responses. The training data and the model file are available within the repository.

## Model Details

* **Model Type**: scikit-learn `RandomForestClassifier`
* **Pipeline Structure**: The pipeline includes a `ColumnTransformer` for one-hot encoding categorical features and the `RandomForestClassifier` itself.
* **Key Hyperparameters**: `n_estimators=100`, `random_state=42`.

## Performance

The model's performance was evaluated on a held-out test set from the original dataset.

* **Accuracy**: 0.93

## Limitations and Ethical Considerations

* **Not a Diagnostic Tool**: This model should be used as a statistical tool for trend analysis and should **not** be used for clinical or psychological diagnosis of addiction. The data is based on self-reported survey responses.
* **Generalizability**: The model was trained on a specific sample of students and may not generalize well to other populations, age groups, or time periods.
* **Data Bias**: The model's predictions reflect the biases present in the original dataset. The results should be interpreted with caution.