This project applies unsupervised machine learning techniques to analyze cryptocurrency market data. Using K-Means clustering, we group cryptocurrencies based on their 24-hour and 7-day price changes. Additionally, we optimize the clustering process by reducing dimensionality with Principal Component Analysis (PCA).
📙 Crypto_Clustering.ipynb - The main Jupyter Notebook containing all the code and analysis.
📊 crypto_market_data.csv - The dataset used for clustering cryptocurrencies.
🗒️ README.md - This file, providing an overview of the project.
🐍 Python
📙 Jupyter Notebook
🐼 Pandas
🤓 Scikit-learn (for K-Means & PCA)
📉 hvPlot (for interactive data visualization)
-
Loaded the
crypto_market_data.csvdataset. -
Standardized numerical features using
StandardScaler().
-
Applied K-Means clustering to the scaled dataset.
-
Used the Elbow Method to determine the optimal number of clusters.
-
Applied K-Means with the best
kvalue to group cryptocurrencies. -
Visualized the results using hvPlot scatter plots.
-
Reduced the dataset to 3 principal components.
-
Calculated the total explained variance.
-
Re-ran the Elbow Method on PCA-transformed data.
-
Determined whether
kchanged after PCA optimization.
-
Applied K-Means clustering on the PCA-transformed data.
-
Visualized the new clusters.
-
Compared original clustering vs. PCA clustering.
-
Analyzed the impact of reducing features with PCA.
-
The best
kvalue for clustering was found using the Elbow Method (4). -
PCA helped reduce dimensionality while retaining most of the data variance.
-
The clustering results changed slightly after PCA.
1️⃣ Clone this repository:
git clone https://github.com/Sharkb8t/CryptoClustering.git3️⃣ Install required libraries (if not already installed):
pip install pandas scikit-learn hvplot2️⃣ Open Jupyter Notebook Crypto_Clustering and run all cells sequentially.