GithubHelp home page GithubHelp logo

clangstonhinton / crypto-clustering-challenge Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.72 MB

Employ unsupervised machine learning to predict outcomes with K-Means and PCA

Jupyter Notebook 100.00%
clustering-algorithm elbow-curves kmeans-clustering machine-learning-algorithms matplotlib pca-analysis python scaling-algorithms

crypto-clustering-challenge's Introduction

Crypto-Clustering-Challenge

Deploy unsupervised learning to predict if cryptocurrencies are affected by 24-hour or 7-day price changes leveraging, Python, K-Means and Principal Component Analysis.

Screen Shot 2023-04-17 at 5 14 16 PM

Data Description

  • The dataset contained pricing data for 41 cryptocurrencies such as: bitcoin, ethereum, tether and ripple among others.
  • 7 columns contain pricing changes for 24-hour, 7-day, 14-day, 30-day, 60-day, 200-day and 1 year periods for each cryptocurrency.

Approach

  • K-means:
    • The data were normalized using the StandardScaler module from scikit-learn
    • Used the elbow method to find the best value for k for the scaled dataset
    • Used K-means to cluster the cryptocurrencies in the scaled dataset
  • PCA (Principal Component Analysis)
    • Using the original scaled data, PCA was performed to optimize clusters by reducing the features to three principal components
    • The explained variance was determined for the three principal components
    • The elbow method was used on the PCA data to find the best value for k
    • K-means was used to cluster the cryptocurrencies in the PCA data
  • Comparison of K-Means Original Features to the PCA Features
    • Plots of the elbow graph and clustered scatter plots were compared between the two approaches

Findings

  1. The optimal value for k against the original scaled data was determined to be 4 clusters using the elbow-method.

Screen Shot 2023-04-20 at 1 14 17 PM

  1. The features were reduced to 3 in the PCA approach and explained 89% of the variance in the dataset.

  2. The PCA approach indicated that the best value for k continued to be 4 based on the elbow-method. However, the inertia values were smaller with PCA than KMeans approach.

Screen Shot 2023-04-20 at 1 14 54 PM

  1. When comparing scatter plots of the clusters from the two approaches, the PCA approach with 3 features produced more tightly grouped clusters than the original KMeans approach.

Screen Shot 2023-04-20 at 1 07 17 PM

  1. The two outliers (celsius-degree-token and ethelend) are the same in both the KMeans Original Scatter and the PCA Scatter plots. It may be beneficial to re-run the models after removing the two outliers from the dataset.

crypto-clustering-challenge's People

Contributors

clangstonhinton avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.