https://github.com/primaryobjects/unsupervised
Applying unsupervised learning using K-means clustering.
https://github.com/primaryobjects/unsupervised
ai artificial-intelligence categorization clustering colors etf etfs javascript k-means k-means-clustering machine-learning machine-learning-algorithms natural-language-processing nlp nlp-machine-learning r rgb topic-discovery
Last synced: 7 months ago
JSON representation
Applying unsupervised learning using K-means clustering.
- Host: GitHub
- URL: https://github.com/primaryobjects/unsupervised
- Owner: primaryobjects
- Created: 2017-07-13T15:25:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-10T19:26:58.000Z (about 8 years ago)
- Last Synced: 2025-03-21T06:41:35.124Z (7 months ago)
- Topics: ai, artificial-intelligence, categorization, clustering, colors, etf, etfs, javascript, k-means, k-means-clustering, machine-learning, machine-learning-algorithms, natural-language-processing, nlp, nlp-machine-learning, r, rgb, topic-discovery
- Language: R
- Size: 189 KB
- Stars: 5
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Unsupervised
=====================Examples of applying unsupervised machine learning using K-means clustering.
Read the tutorial: [Intelligent Topic Detection with Unsupervised Learning](http://www.primaryobjects.com/2017/07/24/intelligent-topic-detection-with-unsupervised-learning/)
## Colors
Unsupervised learning is applied to a data set of randomly generated [colors](/colors/colors.R). 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

### 100 Randomly Generated Colors

### 3 Detected Clusters Within Colors

### Assigning Colors to a Cluster

### Viewing Colors Within Their Cluster

### Predicting the Category for New Colors
The following three colors were used as [new data](/colors/test.txt) for predicting the category for.
```text
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
```
## Exchange Traded Stock and Bond Funds (ETF)
Unsupervised learning is applied to a data set of [exchange traded funds](/etf/data/vanguard-etf.tsv). 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](/etf/etf.R) and [JavaScript](/etf/etf.js).
### 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](/etf/results/train.csv)
### Test Set Category Results
[Results](/etf/results/test.csv)
### Results from JavaScript
[Results](/etf/results/train-js.csv)
## License
MIT
## Author
Kory Becker
http://www.primaryobjects.com/kory-becker