File size: 4,404 Bytes
663bffc
 
e88dfd0
663bffc
 
 
e88dfd0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663bffc
 
 
 
 
e88dfd0
 
 
 
 
663bffc
 
 
e88dfd0
663bffc
e88dfd0
663bffc
e88dfd0
 
 
 
 
 
 
 
 
 
 
663bffc
e88dfd0
663bffc
e88dfd0
663bffc
e88dfd0
 
 
 
663bffc
e88dfd0
663bffc
e88dfd0
663bffc
e88dfd0
 
 
 
 
663bffc
 
 
e88dfd0
663bffc
e88dfd0
 
 
 
663bffc
 
 
e88dfd0
663bffc
e88dfd0
663bffc
 
 
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
# ๐ŸŽต Music Feature Dataset Analysis

Welcome to the Exploratory Data Analysis (EDA) of a music feature dataset. This project aims to uncover insights into how audio features of songs influence user preferences, using the `liked` column as the target variable.

---

## ๐Ÿ“ Dataset Overview: `train.csv`

This dataset contains various musical/audio features for tracks, along with a `liked` score representing user preference.

### ๐ŸŽผ Features Description

| Feature           | Description                                                           |
|-------------------|------------------------------------------------------------------------|
| `danceability`    | Suitability of a track for dancing.                                    |
| `energy`          | Intensity and activity level of the track.                             |
| `key`             | Musical key as an integer (0 to 11).                                   |
| `loudness`        | Overall loudness in decibels (dB).                                     |
| `mode`            | Tonality: major (1) or minor (0).                                      |
| `speechiness`     | Presence of spoken words in the track.                                 |
| `acousticness`    | Likelihood the track is acoustic.                                      |
| `instrumentalness`| Predicts whether a track contains no vocals.                           |
| `liveness`        | Presence of an audience in the recording.                              |
| `valence`         | Positiveness conveyed by the music.                                    |
| `tempo`           | Tempo in beats per minute (BPM).                                       |
| `duration_ms`     | Duration of the track in milliseconds.                                 |
| `time_signature`  | Estimated time signature (usually 3, 4, or 5).                         |
| `liked`           | User preference score (continuous numerical value).                    |

---

## ๐Ÿงผ Data Preprocessing

- โœ… Handled missing values
- โœ… Removed duplicates
- โœ… Normalized numeric features using **Z-score normalization**
- โœ… Detected outliers using box plots
- โœ… Computed summary statistics (mean, std, etc.)

---

## ๐Ÿ“Š Visual Analysis

Visualizations included in the analysis:

| Visualization                     | Description                                  |
|----------------------------------|----------------------------------------------|
| ![Missing Values](missing_values_graph.png)         | Heatmap of missing values                     |
| ![Unique and Duplicated](unique_duplicated.png)     | Count of unique and duplicate rows            |
| ![Z-Score](zscore.png)                             | Normalized feature distributions              |
| ![Top & Bottom Liked](top_bottom_liked.png)         | Most and least liked tracks                   |
| ![Distribution](distribution.png)                   | Histograms of key features                    |
| ![Danceability Histogram](danceability_histogram.png)| Focused view on `danceability` distribution   |
| ![Mean and STD](mean_std_plot.png)                  | Feature-wise mean and standard deviation      |
| ![Correlation Heatmap](correlation_heatmap.png)     | Feature correlation with `liked`              |
| ![Boxplot](boxplot.png)                             | Outlier detection via box plots               |

---

## ๐Ÿ“ˆ Key Findings

- ๐Ÿ”น Features like `energy`, `valence`, and `danceability` have **positive correlation** with the `liked` score.
- ๐Ÿ”น Features like `key` and `mode` show **low or no correlation** with user preference.
- ๐Ÿ”น Most features are approximately **normally distributed**.
- ๐Ÿ”น Tracks that are **highly energetic, positive, and danceable** are generally more liked.

---

## ๐Ÿ› ๏ธ Tools & Libraries Used

- **Language**: Python ๐Ÿ
- **Libraries**:
  - `pandas`, `numpy` for data handling
  - `matplotlib`, `seaborn` for visualizations
  - `scikit-learn` for preprocessing

---

## ๐Ÿ“Œ Conclusion

This analysis helps identify which audio features most impact user preferences. These insights can guide the development of:
- ๐ŸŽง Music recommendation systems
- ๐Ÿ“Š User behavior models
- ๐Ÿค– Feature engineering in ML projects

---

## ๐Ÿ‘ค Author

**Sujal Thakkar**

---