Top Banner
Unsupervised Learning in H20 H20 World 2014 A.Tellez, S.Subramanian, L.Tashkevych, T.Nguyen
19

h2o-world_v12.0

Jul 28, 2015

Download

Documents

Alex Tellez
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: h2o-world_v12.0

Unsupervised Learning in H20

H20 World 2014A.Tellez, S.Subramanian, L.Tashkevych, T.Nguyen

Page 2: h2o-world_v12.0

What is Unsupervised Learning

Unsupervised Learning: Generalizing the internal structure of the data where no prediction is necessary. Supervised learning must stand on curated

data whereas unsupervised learning requires no ‘answer book’.

Common Unsupervised Learning Approaches: Clustering: k-means, mixture-models, affinity

propagation Dimensionality Reduction: PCA, Autoencoders Hidden Markov Models Topic Extraction: NMF, LDA

Page 3: h2o-world_v12.0

Example: Single Malt Scotch

Single Malt Scotch: A whiskey made at one particular distillery from a mash that only uses malted grain (barley). Must be aged at least 3 years in oak casks Many famous distilleries produced in northern

regions of Scotland

Page 4: h2o-world_v12.0

Single Malt Dataset

The Single Malt Whiskey Dataset 85 distilleries from northern Scotland 12 descriptor features

E.g. Sweetness, Smoky, Tobacco, Honey, Spicy, Malty, etc Each descriptor rated 0 (weak) 4 (strong) Dataset kindly provided here*.

How can we use our knowledge of unsupervised learning to learn more about single malt whiskeys? Can build a whiskey recommendation engine based on

whiskeys we like already?

* Dataset Source: https://www.mathstat.strath.ac.uk/outreach/nessie/nessie_whisky.html

Page 5: h2o-world_v12.0

Dimension Reduction + K-Means

First, let’s reduce the 12 features to a lower dimensional space using Principal Component Analysis… …7 principal components explain 85% of the

variance in the dataset

Then, let’s use k-means clustering to determine how the unique groups using the new PCA’d dataset Grid Search shows that 11 clusters are appropriate Pipe out result and attach original distillery labels to

see what whiskey’s cluster with each other all using H20!

Page 6: h2o-world_v12.0

Model Results

I ENJOY:

OTHER WHISKEYS THAT CLUSTER WITH THESE:

Page 7: h2o-world_v12.0

Model Results Cont’d.

SOME OF YOU MY LIKE:

OTHER WHISKEYS IN THE SAME CLUSTER:

Page 8: h2o-world_v12.0

Example: Feeling like ramen?

Burning question: You like Japanese ramen, where can you go for dinner tonight if you want ramen around Mountain View?

8

Page 9: h2o-world_v12.0

Ramen Yelp Dataset

Harvested all the known ramen shops around Mountain View and built our Yelp dataset:

9

Page 10: h2o-world_v12.0

Step 1: PCA

85% of cumulative variance in dataset explained using 2 PC’s

10

Firs

t P

C

Second PC

Page 11: h2o-world_v12.0

Step 2: K-Means

Grid Search shows 4 clusters on PCA’d dataset

I really like this ramen joint:

I’m thinking these places for dinner tonight:

11

Page 12: h2o-world_v12.0

Example: Bordeaux Wines

Bordeaux is the largest wine growing region in France 700 Million bottles of wine (red + white) annually

Some years better than other years Great ($$$) vs. Typical ($) Last Great Years: 2010, 2009, 2005, 2000

Author
Page 13: h2o-world_v12.0

Buying Bordeaux ‘en primeur’

While wine is still barreled, purchasers can ‘invest’ in the wine before bottling and official public release

Advantage: Wines may be considerably cheaper during ‘en primeur’ period than official release.

13

Great Years: 2000,’05,’09’

Page 14: h2o-world_v12.0

Red Obsession Trailer

Sri, there is a 3 minute movie trailer for red obsession that I will show but didn’t send due to size limitation in email.

Page 15: h2o-world_v12.0

Great Vintage vs. Typical Vintage

Question: Can we study the weather patterns in Bordeaux leading up to harvest to identify ‘anomalous’ weather years correlates to Great Vintage vs. Typical Vintage?

The Bordeaux Dataset (1952 – 2014) : Yearly data that measures: Winter Rain (October March of harvest year) Average Summer Temp (April September of

harvest year) Harvest Rain (August September of harvest year)

Page 16: h2o-world_v12.0

Autoencoder + Anomaly Detection

In Steps:

Train an autoencoder model to learn Typical Vintage year weather patterns

Append Great Vintage year weather data to original dataset.

IF Great Vintage year weather data does not match learned weather pattern, autoencoder will produce high reconstruction error (MSE).

‘en primeur’ of ‘en primeur’: Can we use weather patterns to identify anomalous years which may be indicative of Great Vintage quality?

Page 17: h2o-world_v12.0

Autoencoder Results (MSE > 0.25)

Mean

Sq

uare

Erro

r

1961 V

1989 V

1990 V2000 V

2003 NV*

2005 NV

2009 V2010 V

2011 NV*

Page 18: h2o-world_v12.0

2014 Bordeaux? You Decide!

18

2014 ??

2013 NV

Page 19: h2o-world_v12.0

Thank You!

What single malt whiskeys do you like? Our github has link to original whiskey dataset and

the PCA + K-Means cluster assignments Add to your Netflix: Red Obsession (2013), Somm

(2012) github.com/LenaTash/RH_MachineLearning

All work done in presentation using H20 (Thanks Sri!)

Questions + Comments?