Giter Site home page Giter Site logo

primaryobjects / unsupervised Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 5.0 194 KB

Applying unsupervised learning using K-means clustering.

R 69.08% JavaScript 30.92%
artificial-intelligence machine-learning machine-learning-algorithms clustering k-means k-means-clustering r javascript rgb colors natural-language-processing nlp nlp-machine-learning ai categorization topic-discovery etfs etf

unsupervised's Introduction

Unsupervised

Examples of applying unsupervised machine learning using K-means clustering.

Read the tutorial: Intelligent Topic Detection with Unsupervised Learning

Colors

Unsupervised learning is applied to a data set of randomly generated colors. The red, green, and blue values are used as features to categorize each color under a specific parent category.

For example, purple might be categories as Red or Blue. Likewise, Sky Blue would be categorized under Blue.

Cluster Categories

  • Red
  • Green
  • Blue

Results

The following graphs show the results of clustering and categorizing colors by their red, green, and blue values.

1,000 Randomly Generated Colors

1,000 Randomly Generated Colors

100 Randomly Generated Colors

100 Randomly Generated Colors

3 Detected Clusters Within Colors

3 Detected Clusters Within Colors

Assigning Colors to a Cluster

Assigning Colors to a Cluster

Viewing Colors Within Their Cluster

Viewing Colors Within Their Cluster

Predicting the Category for New Colors

The following three colors were used as new data for predicting the category for.

  red green blue     hex x        y group label
1 241    52   11 #F1340B 1 15807499     2   red
2  80   187  139 #50BB8B 2  5290891     3 green
3  34    15  194 #220FC2 3  2232258     1  blue

Predicting the Category for New Colors

Exchange Traded Stock and Bond Funds (ETF)

Unsupervised learning is applied to a data set of exchange traded funds. The percentage values for "Year to Date", "1 Year", "5 Year", and "10 Year" returns are used as features to categorize each ETF under a specific parent category. Example code is provided in R and JavaScript.

Cluster Categories

  • International
  • StockBigGain
  • Stock
  • Bond
  • SmallMidLargeCap

Results

The following output shows the results of clustering and categorizing ETF funds based on their percentage returns.

Training Set Category Results

Results

Test Set Category Results

Results

Results from JavaScript

Results

License

MIT

Author

Kory Becker

http://www.primaryobjects.com/kory-becker

unsupervised's People

Contributors

primaryobjects avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.