Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Intro to Apache Mahout

29,381 views

Published on

Intro level talk to Apache Mahout machine learning library.

Published in: Technology, Education
  • Great information about writing! If you ever need any help with proofreading, editing or research check out Writer’s Help. They are a great resource for personal, educational or business writing needs. The website is ⇒ HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❶❶❶ http://bit.ly/39mQKz3 ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/39mQKz3 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Intro to Apache Mahout

  1. 1. Machine Learning with Apache Mahout <br />Grant Ingersoll<br />July 8, 2010<br />
  2. 2. Introduction<br />You<br />Machine learning experience?<br />Business Intelligence?<br />Natural Lang. Processing?<br />ApacheHadoop?<br />Me<br />Co-founder Apache Mahout<br />Apache Lucene/Solr committer<br />Co-founder Lucid Imagination<br />
  3. 3. Topics<br />What is Machine Learning?<br />ML Use Cases<br />What is Mahout?<br />What can I do with it right now?<br />Where’s Mahout headed?<br />
  4. 4. Amazon.com<br />What is Machine Learning?<br />Google News<br />
  5. 5. Really it’s…<br />“Machine Learning is programming computers to optimize a performance criterion using example data or past experience”<br />Intro. To Machine Learning by E. Alpaydin<br />Subset of Artificial Intelligence<br />Lots of related fields:<br />Information Retrieval<br />Stats<br />Biology<br />Linear algebra<br />Many more<br />
  6. 6. Common Use Cases<br />Recommend friends/dates/products<br />Classify content into predefined groups<br />Find similar content based on object properties<br />Find associations/patterns in actions/behaviors<br />Identify key topics in large collections of text<br />Detect anomalies in machine output<br />Ranking search results<br />Others?<br />
  7. 7. Useful Terminology<br />Vectors/Matrices<br />Weights<br />Sparse<br />Dense<br />Norms<br />Features<br />Feature reduction<br />Occurrences and Co-occurrences<br />
  8. 8. Getting Started with ML<br />Get your data<br />Decide on your features per your algorithm<br />Prep the data<br />Different approaches for different algorithms<br />Run your algorithm(s)<br />Lather, rinse, repeat<br />Validate your results<br />Smell test, A/B testing, more formal methods<br />
  9. 9. Apache Mahout<br />http://dictionary.reference.com/browse/mahout<br />An Apache Software Foundation project to create scalable machine learning libraries under the Apache Software License<br />http://mahout.apache.org<br />Why Mahout?<br />Many Open Source ML libraries either:<br />Lack Community<br />Lack Documentation and Examples<br />Lack Scalability<br />Lack the Apache License<br />Or are research-oriented<br />
  10. 10. Focus: Machine Learning<br />Applications<br />Examples<br />Recommenders<br />Clustering<br />Classification<br />Freq. Pattern<br />Mining<br />Genetic<br />Math<br />Vectors/Matrices/SVD<br />Utilities<br />Lucene/Vectorizer<br />Collections (primitives)<br />Apache Hadoop<br />See http://cwiki.apache.org/confluence/display/MAHOUT/Algorithms<br />
  11. 11. Focus: Scalable<br />Goal: Be as fast and efficient as possible given the intrinsic design of the algorithm<br />Some algorithms won’t scale to massive machine clusters<br />Others fit logically on a Map Reduce framework like Apache Hadoop<br />Still others will needalternative distributed programming models<br />Be pragmatic<br />Most Mahout implementations are Map Reduce enabled<br />(Always a) Work in Progress<br />
  12. 12. Prepare Data from Raw content<br />Data Sources:<br />Lucene integration<br />bin/mahout lucenevector …<br />Document Vectorizer<br />bin/mahout seqdirectory …<br />bin/mahout seq2sparse …<br />Programmatically<br />See the Utils module in Mahout<br />Database<br />File system<br />
  13. 13. Recommendations<br />Extensive framework for collaborative filtering<br />Recommenders<br />User based<br />Item based<br />Online and Offline support<br />Offline can utilize Hadoop<br />Many different Similarity measures<br />Cosine, LLR, Tanimoto, Pearson, others<br />
  14. 14. Clustering<br />Document level<br />Group documents based on a notion of similarity<br />K-Means, Fuzzy K-Means, Dirichlet, Canopy, Mean-Shift<br />Distance Measures<br />Manhattan, Euclidean, other<br />Topic Modeling <br />Cluster words across documents to identify topics<br />Latent Dirichlet Allocation<br />
  15. 15. Categorization<br />Place new items into predefined categories:<br />Sports, politics, entertainment<br />Mahout has several implementations<br />Naïve Bayes<br />Complementary Naïve Bayes<br />Decision Forests<br />Logistic Regression (Almost done)<br />
  16. 16. Freq. Pattern Mining<br />Identify frequently co-occurrent items<br />Useful for:<br />Query Recommendations<br />Apple -> iPhone, orange, OS X<br />Related product placement<br />“Beer and Diapers”<br />Spam Detection<br />Yahoo: http://www.slideshare.net/hadoopusergroup/mail-antispam<br />http://www.amazon.com<br />
  17. 17. Evolutionary<br />Map-Reduce ready fitness functions for genetic programming<br />Integration with Watchmaker<br />http://watchmaker.uncommons.org/index.php<br />Problems solved:<br />Traveling salesman<br />Class discovery<br />Many others<br />
  18. 18. Singular Value Decomposition<br />Reduces a big matrix into a much smaller matrix by amplifying the important parts while removing/reducing the less important parts<br />Mahout has fully distributed Lanczos implementation<br /><MAHOUT_HOME>/bin/mahout svd -Dmapred.input.dir=path/to/corpus --tempDir path/for/svd-output --rank 300 --numColumns <numcols> --numRows <num rows in the input><br /><MAHOUT_HOME>/bin/mahout cleansvd --eigenInput path/for/svd-output --corpusInput path/to/corpus --output path/for/cleanOutput --maxError 0.1 --minEigenvalue 10.0 <br />https://cwiki.apache.org/confluence/display/MAHOUT/Dimensional+Reduction<br />
  19. 19. How To: Recommenders<br />Data: <br />Users (abstract)<br />Items (abstract)<br />Ratings (optional)<br />Load the data model<br />Ask for Recommendations:<br />User-User<br />Item-Item<br />
  20. 20. Ugly Demo I<br />Group Lens Data: http://www.grouplens.org<br />http://lucene.apache.org/mahout/taste.html#demo<br />http://localhost:8080/RecommenderServlet?userID=1&debug=true<br />In other words: the reason why I work on servers, not UIs!<br />
  21. 21. How to: Command Line<br />Most algorithms have a Driver program<br />Shell script in $MAHOUT_HOME/bin helps with most tasks<br />Prepare the Data<br />Different algorithms require different setup<br />Run the algorithm<br />Single Node<br />Hadoop<br />Print out the results<br />Several helper classes: <br />LDAPrintTopics, ClusterDumper, etc.<br />
  22. 22. Ugly Demo II - Prep<br />Data Set: Reuters<br />http://www.daviddlewis.com/resources/testcollections/reuters21578/<br />Convert to Text via http://www.lucenebootcamp.com/lucene-boot-camp-preclass-training/<br />Convert to Sequence File:<br />bin/mahout seqdirectory –input <PATH> --output <PATH> --charset UTF-8<br />Convert to Sparse Vector:<br />bin/mahout seq2sparse --input <PATH>/content/reuters/seqfiles/ --norm 2 --weight TF --output <PATH>/content/reuters/seqfiles-TF/ --minDF 5 --maxDFPercent 90<br />
  23. 23. Ugly Demo II: Topic Modeling<br />Latent Dirichlet Allocation<br />./mahout lda --input <PATH>/content/reuters/seqfiles-TF/vectors/ --output <PATH>/content/reuters/seqfiles-TF/lda-output --numWords 34000 –numTopics 10<br />./mahout org.apache.mahout.clustering.lda.LDAPrintTopics --input <PATH>/content/reuters/seqfiles-TF/lda-output/state-19 --dict <PATH>/content/reuters/seqfiles-TF/dictionary.file-0 --words 10 --output <PATH>/content/reuters/seqfiles-TF/lda-output/topics --dictionaryTypesequencefile<br />Good feature reduction (stopword removal) required<br />
  24. 24. Ugly Demo III: Clustering<br />K-Means<br />Same Prep as UD II, except use TFIDF weight<br />./mahout kmeans --input <PATH>/content/reuters/seqfiles-TFIDF/vectors/part-00000 --k 15 --output <PATH>/content/reuters/seqfiles-TFIDF/output-kmeans --clusters <PATH>/content/reuters/seqfiles-TFIDF/output-kmeans/clusters<br />Print out the clusters: ./mahout clusterdump --seqFileDir <PATH>/content/reuters/seqfiles-TFIDF/output-kmeans/clusters-15/ --pointsDir <PATH>/content/reuters/seqfiles-TFIDF/output-kmeans/points/ --dictionary <PATH>/content/reuters/seqfiles-TFIDF/dictionary.file-0 --dictionaryTypesequencefile --substring 20<br />
  25. 25. Ugly Demo IV: Frequent Pattern Mining<br />Data: http://fimi.cs.helsinki.fi/data/<br />./mahout fpg -i <PATH>/content/freqitemset/accidents.dat -o patterns -k 50 -method mapreduce -g 10 -regex [ ]<br /> ./mahout seqdump --seqFile patterns/fpgrowth/part-r-00000 <br />
  26. 26. What’s Next?<br />Google Summer of Code (GSOC)<br />Restricted Boltzmann Machines<br />SVM<br />EigenCuts (spectral clustering)<br />Neural Networks<br />SVD-based Recommender<br />0.4 release in Fall (after GSOC)<br />Stabilize API’s for 1.0 release<br />Benchmarking<br />http://cwiki.apache.org/MAHOUT/howtocontribute.html<br />
  27. 27. Resources<br />Slides will be posted at http://lucene.grantingersoll.com<br />Examples at:<br />http://lucene.grantingersoll.com/2010/02/13/intro-to-mahout-slides-and-demo-examples/ <br />More Examples in Mahout SVN in the examples directory<br />
  28. 28. Resources<br />http://mahout.apache.org<br />http://cwiki.apache.org/MAHOUT<br />{user|dev}@mahout.apache.org<br />http://svn.apache.org/repos/asf/mahout/trunk<br />http://hadoop.apache.org<br />
  29. 29. Resources<br />“Mahout in Action” by Owen and Anil<br />http://lucene.li/E<br />“Taming Text” by Ingersoll, Morton and Farris<br />http://lucene.li/D<br />“Introducing Apache Mahout” <br />http://lucene.li/F<br />“Programming Collective Intelligence” by Toby Segaran<br />http://lucene.li/G<br />“Data Mining - Practical Machine Learning Tools and Techniques” by Ian H. Witten and Eibe Frank<br />http://lucene.li/H<br />
  30. 30. References<br />HAL: http://en.wikipedia.org/wiki/File:Hal-9000.jpg<br />Terminator: http://en.wikipedia.org/wiki/File:Terminator1984movieposter.jpg<br />Matrix: http://en.wikipedia.org/wiki/File:The_Matrix_Poster.jpg<br />Google News: http://news.google.com<br />Amazon.com: http://www.amazon.com<br />Facebook: http://www.facebook.com<br />Mahout: http://lucene.apache.org/mahout<br />Beer and Diapers: http://www.flickr.com/photos/baubcat/2484459070/<br />http://www.theregister.co.uk/2006/08/15/beer_diapers/<br />DMOZ: http://www.dmoz.org<br />

×