Objective: Utilize unsupervised learning to cluster crptocurrencies by their performance in different time periods.
- Import the data
- Prepare the data
- Find the best value for k by using the original data.
- Cluster the cryptocurrencies with K-means by using the original data.
- Optimize the clusters with principal component analysis.
- Find the best value for k by using the PCA data.
- Cluster the cryptocurrencies with K-means by using the PCA data.
- Visualize and compare the results.
Use the elbow method to find the best value for k by using the original data. To do so, complete the following steps:
- Code the elbow method algorithm to find the best value for k. Use a range from 1 to 11.
- To visually identify the optimal value for k, plot a line chart of all the inertia values computed with the different values of k.
- Answer the following question: What’s the best value for k?
Use the K-means algorithm along with the best value for k that you found by using the original data. Specifically, you’ll use them to cluster the cryptocurrencies according to the provided price changes of the cryptocurrencies provided.
Perform PCA and reduce the features to three principal components.
Use the elbow method to find the best value for k by using the PCA data.
Use the PCA data, the K-means algorithm, and the best value for k that you found by using the PCA data. Specifically, you’ll use them to cluster the cryptocurrencies according to the principal components.
Visually analyze the cluster analysis results by observing the outcome both with and without the use of optimization techniques.