Apache Mahout - Isabel

12 downloads 301 Views 10MB Size Report
Data Mining Applications. ○ Marketing. ○ Surveillance. ○ Fraud Detection. ○ Scientific Discovery. ○ Discover i
Apache Mahout Making data analysis easy

Isabel Drost Nighttime: Co-Founder, committer Apache Mahout. Organiser of Berlin Hadoop Get Together.

Daytime: Software developer. Guest lecturer at TU Berlin. Co-Organiser Berlin Buzzwords 2010.





“Mastering Data-Intensive Collaboration and Decision Making” EU funded research project – –

Number of partners: 8 Coordinator: Research Academic Computer Technology Institute (CTI), Greece

Hello Devoxx!

Hello Devoxx!

Hello Devoxx!

Hello Devoxx!

Hello Devoxx!

Machine learning background?

Hello Devoxx!

Hello Devoxx!

Agenda ●

Data Mining/ Machine Learning?



Why is scaling hard?



Going beyond simple statistics.

Data Mining Applications ●

Marketing.



Surveillance.



Fraud Detection.



Scientific Discovery.



Discover items usually purchased together. = Extracting patterns from data.

Machine Learning Applications ●

E-Mail spam classification.



News-topic discovery.



Building recommender systems. = Extracting prediction models from data.

Machine learning – what's that?

Image by John Leech, from: The Comic History of Rome by Gilbert Abbott A Beckett. Bradbury, Evans & Co, London, 1850s Archimedes taking a Warm Bath

Archimedes model of nature

June 25, 2008 by chase-me http://www.flickr.com/photos/sasy/2609508999

An SVM's model of nature

The challenge

Mission Provide scalable data mining algorithms.

http://www.flickr.com/photos/honou/2936937247/

HowTo: From data to information.

January 3, 2006 by Matt Callow http://www.flickr.com/photos/blackcustard/81680010

http://www.flickr.com/photos/29143375@N05/3344809375/in/photostream/

http://www.flickr.com/photos/redux/409356158/

http://www.flickr.com/photos/disowned/1158260369/

The HDFS filesystem is not restricted to MapReduce jobs. It can be used for other applications, many of which are under way at Apache. The list includes the HBase database, the Apache Mahout machine learning system, and matrix operations.

http://www.flickr.com/photos/29143375@N05/3344809375/in/photostream/

http://www.flickr.com/photos/redux/409356158/in/photostream/

http://www.flickr.com/photos/noodlepie/2675987121/

http://www.flickr.com/photos/topsy/204929063/

http://www.flickr.com/photos/29143375@N05/3344809375/in/photostream/

http://www.flickr.com/photos/redux/409356158/

From data to information. ●

Collect data and define your learning problem.



Data preparation.



Training a prediction model.



Checking the performance of your model.



Remove noise.



Remove noise.



Convert text to vectors.

From texts to vectors

If we looked at two words only: Sunny weather

High performance computing

Aaron

Zuse

Binary bag of words ●

Imagine a n-dimensional space.



Each dimension = one possible word in texts.



Entry in vector is one, if word occurs in text.



Problem: ●

bi , j =

{

1 ∀ xi ∈ d j 0 else

}

Number of word occurrences not accounted for.

Term Frequency ●

Imagine a n-dimensional space.



Each dimension = one possible word in texts.



Entry in vector equal to the words frequency.



Problem: ●

bi , j =ni , j

Common words dominate vectors.

TF with stop wording ●

Imagine a n-dimensional space.



Each dimension = one possible word in texts.



Filter stopwords.



Entry in vector equal to the words frequency.



Problem: ●

bi , j =ni , j

Common and uncommon words with same weight.

TF- IDF ●

Imagine a n-dimensional space.



Each dimension = one possible word in texts.



Filter stopwords.



Entry in vector equal to the weighted frequency.



Problem: ●

bi , j =ni , j ×log

∣D∣  ∣{ d : t i ∈d }∣

Long texts get larger values.

Normalized TF- IDF ●

Imagine a n-dimensional space.



Each dimension = one possible word in texts.



Filter stopwords.



Entry in vector equal to the weighted frequency.



Normalize vectors. bi , j =



Problem: ●

ni , j

∑k

∣D∣ ×log   ∣{ d : t i ∈d }∣ nk , j

Additional domain knowledge ignored.

Reality ●

There are a few more words in news.



Use all relevant features/ signals available.





Words.



Header fields.



Characteristics of publishing url.





Usually pipeline of feature extractors.

From data to information. ●

Collect data and define your learning problem.



Data preparation.



Training a prediction model.



Checking the performance of your model.

Step 2: Similarity

Euclidian

Euclidian

Euclidian

Cosine

Step 3: Clustering

Until stable.

Reality ●

Seed selection.



Choice of initial k.



Continuous updates.



Regular addition of clusters.

From data to information. ●

Collect data and define your learning problem.



Data preparation.



Training a prediction model.



Checking the performance of your model.

Evaluation ●

Compare against gold standard.



Use quality measures.



Manual inspection.

From data to information. ●

Collect data and define your learning problem.



Data preparation.



Training a prediction model.



Checking the performance of your model.

http://www.flickr.com/photos/generated/943078008/

What else does Mahout have to offer.

Identify dominant topics ●

Given a dataset of texts, identify main topics. Algorithms: Parallel LDA



Examples: ●

Dominant topics in set of mails.



Identify news message categories.

Assign items to defined categories. ●

Given pre-defined categories, assign items to it.

By freezelight, http://www.flickr.com/photos/63056612@N00/155554663/

Recommendation mining.



Collaborative filtering.

Show most relevant ads

Show most relevant ads

http://www.flickr.com/photos/jfclere/4061801735

Recommending places

http://www.flickr.com/photos/25831000@N08/4156701164

http://www.flickr.com/photos/claudio_ar/2643165035/ http://www.flickr.com/photos/philfotos/4510197138/

http://www.flickr.com/photos/alainpicard/4175214747

http://www.flickr.com/photos/joachim_s_mueller/2417313476/

http://www.flickr.com/photos/sebastian_bergmann/1244514498

Thanks to Falko Menge for the pictures of Brussels.

http://www.flickr.com/photos/claudio_ar/2643180457

Recommending people

Recommendation mining. ●

Online collaborative filtering on single machine.



Offline Map/Reduce based version.



Content similarity can be integrated.



Based on former Taste project.

Frequent pattern mining ●



Given groups of items, find commonly cooccurring items.

Examples: ●

In shopping carts find items bought together.



In query logs find queries issued in one session.

By crypto, http://www.flickr.com/photos/crypto/3201254932/sizes/l/ By libraryman, http://www.flickr.com/photos/libraryman/78337046/sizes/l/

By quinnanya, http://www.flickr.com/photos/quinnanya/2806883231/

By crypto, http://www.flickr.com/photos/crypto/3201254932/sizes/l/ By libraryman, http://www.flickr.com/photos/libraryman/78337046/sizes/l/

Requirements to get started

March 14, 2009 by Artful Magpie http://www.flickr.com/photos/kmtucker/3355551036/

Why go for Apache Mahout?

Jumpstart your project with proven code.

January 8, 2008 by dreizehn28 http://www.flickr.com/photos/1328/2176949559

Discuss ideas and problems online.

November 16, 2005 [phil h] http://www.flickr.com/photos/hi-phi/64055296

Become a committer.

Become a committer: Of Apache Mahout

Sebastian Schelter Jake Mannix Benson Margulies Robin Anil David Hall AbdelHakim Deneche Karl Wettin Sean Owen Grant Ingersoll Otis Gospodnetic Drew Farris Jeff Eastman Ted Dunning Isabel Drost

Emeritus: Niranjan Balasubramanian Erik Hatcher Ozgur Yilmazel Dawid Weiss

*[email protected] *[email protected] Interest in solving hard problems. Being part of lively community. Engineering best practices.

Bug reports, patches, features. Documentation, code, examples. Image by: Patrick McEvoy

Thanks to Tim Lossen et. al for taking amazing pictures of the conf.

Berlin Buzzwords 2011 Search/ Store/ Scale

May/ June 2011

Thanks to Tim Lossen et. al for taking amazing pictures of the conf.

*[email protected] *[email protected] Interest in solving hard problems. Being part of lively community. Engineering best practices.

Bug reports, patches, features. Documentation, code, examples. Image by: Patrick McEvoy