Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCErik Krogen
Erik Krogen of LinkedIn presents regarding Dynamometer, a system open sourced by LinkedIn for scale- and performance-testing HDFS. He discusses one major use case for Dynamometer, tuning NameNode GC, and discusses characteristics of NameNode GC such as why it is important, and how it interacts with various current and future GC algorithms.
This is taken from the Apache Hadoop Contributors Meetup on January 30, hosted by LinkedIn in Mountain View.
A Deep Dive into Query Execution Engine of Spark SQLDatabricks
Spark SQL enables Spark to perform efficient and fault-tolerant relational query processing with analytics database technologies. The relational queries are compiled to the executable physical plans consisting of transformations and actions on RDDs with the generated Java code. The code is compiled to Java bytecode, executed at runtime by JVM and optimized by JIT to native machine code at runtime. This talk will take a deep dive into Spark SQL execution engine. The talk includes pipelined execution, whole-stage code generation, UDF execution, memory management, vectorized readers, lineage based RDD transformation and action.
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCErik Krogen
Erik Krogen of LinkedIn presents regarding Dynamometer, a system open sourced by LinkedIn for scale- and performance-testing HDFS. He discusses one major use case for Dynamometer, tuning NameNode GC, and discusses characteristics of NameNode GC such as why it is important, and how it interacts with various current and future GC algorithms.
This is taken from the Apache Hadoop Contributors Meetup on January 30, hosted by LinkedIn in Mountain View.
A Deep Dive into Query Execution Engine of Spark SQLDatabricks
Spark SQL enables Spark to perform efficient and fault-tolerant relational query processing with analytics database technologies. The relational queries are compiled to the executable physical plans consisting of transformations and actions on RDDs with the generated Java code. The code is compiled to Java bytecode, executed at runtime by JVM and optimized by JIT to native machine code at runtime. This talk will take a deep dive into Spark SQL execution engine. The talk includes pipelined execution, whole-stage code generation, UDF execution, memory management, vectorized readers, lineage based RDD transformation and action.
PromQL Deep Dive - The Prometheus Query Language Weaveworks
- What is PromQL
- PromQL operators
- PromQL functions
- Hands on: Building queries in PromQL
- Hands on: Visualizing PromQL in Grafana
- Prometheus alerts in PromQL
- Hands on: Creating an alert in Prometheus with PromQL
넥슨코리아 사내 발표자료로 왓 스튜디오에서 파이썬으로 《야생의 땅: 듀랑고》 서버를 비롯한 여러가지 도구를 만든 경험을 공유합니다.
- 게임서버와 각종 툴, 테스트/빌드/배포 시스템을 만들 때 사용한 재료
- 파이썬 코드 품질 개선, 디버깅, 프로파일링, 최적화
- 파이썬 오픈소스 생태계와 왓 스튜디오가 하는 오픈소스 활동
PromQL Deep Dive - The Prometheus Query Language Weaveworks
- What is PromQL
- PromQL operators
- PromQL functions
- Hands on: Building queries in PromQL
- Hands on: Visualizing PromQL in Grafana
- Prometheus alerts in PromQL
- Hands on: Creating an alert in Prometheus with PromQL
넥슨코리아 사내 발표자료로 왓 스튜디오에서 파이썬으로 《야생의 땅: 듀랑고》 서버를 비롯한 여러가지 도구를 만든 경험을 공유합니다.
- 게임서버와 각종 툴, 테스트/빌드/배포 시스템을 만들 때 사용한 재료
- 파이썬 코드 품질 개선, 디버깅, 프로파일링, 최적화
- 파이썬 오픈소스 생태계와 왓 스튜디오가 하는 오픈소스 활동
ITS 4차 메인 세미나_알고리즘(배은정, 김용겸, 김성수, 정민영, 유재현)
왓챠(Watcha) 알고리즘 분석(15.11.06)
고려대학교 정보기술경영학회 : ITS
Web: http://itsociety.co.kr/
Mail: president@itsociety.co.kr
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017Carol Smith
What is machine learning? Is UX relevant in the age of artificial intelligence (AI)? How can I take advantage of cognitive computing? Get answers to these questions and learn about the implications for your work in this session. Carol will help you understand at a basic level how these systems are built and what is required to get insights from them. Carol will present examples of how machine learning is already being used and explore the ethical challenges inherent in creating AI. You will walk away with an awareness of the weaknesses of AI and the knowledge of how these systems work.
[PYCON Korea 2018] Python Application Server for Recommender System Kwangseob Kim
한글 수정: https://www.slideshare.net/kimkwangseop/pycon-korea-2018-python-application-server-for-recommender-system-110602118
추천 시스템을 위한 어플리케이션 서버 개발 후기
@ PYCON Korea 2018
link: https://www.pycon.kr/2018/program/33
고재성(jake.ko) / kakao corp.(포털 플랫폼 개발파트)
---
가장 먼저 Daum 서비스를 만나 볼 수 있는 첫 화면!
변화된 Daum 모바일 첫 화면 서비스를 소개합니다.
기존 시스템의 구성과 문제점부터 개선 과정을 통해 변화된 시스템 구성, 운영 노하우, 기술 스택에 대해서 공유합니다.
다양한 콘텐츠를 안정적으로 제공하기 위한 고민 과정, 우리가 생각하는 앞으로의 포털의 모습에 대해서 이야기해보려 합니다.
Machine Learning Foundations (a case study approach) 강의 정리SANG WON PARK
실제 비즈니스에서 많이 활용되는 사례를 중심으로 어떻게 기존 데이터를 이용하여 알고리즘을 선택하고, 학습하여, 예측모델을 구축 하는지 jupyter notebook을 이용하여 실제 코드를 이용하여 실습할 수 있다.
강의 초반에 강조하는 것 처럼, 머신러닝 알고리즘은 나중에 자세히 설명하는 과정이 따로 있고, 이번 강의는 실제 어떻게 활용하는지에 완전히 초점이 맞추어져 있어서, 알고리즘은 아주 간략한 수준으로 설명해 준다. (좀 더 구체적인 내용은 심화과정이 따로 있음)
http://blog.naver.com/freepsw/221113685916 참고
https://github.com/freepsw/coursera/tree/master/ML_Foundations/A_Case_Study 코드 샘플
링크드인의 Big Data Recommendation Products - 어제의 데이터를 통해 내일을 예측한다Evion Kim
DEVIEW 2013 발표 내용입니다 - http://deview.kr/2013/detail.nhn?topicSeq=36
링크드인 플랫폼 상의 다양한 Recommendation Product들, 이 제품들의 키워드는 바로 'Relevance(연관성)' 입니다. 가장 관련있는 데이터들을 제공함으로써 사용자의 삶을 더 쉽고 편하게 만들어 주는것이 링크드인 데이터 팀의 목표라 할 수 있겠습니다. 그렇다면 어떻게 해야 사용자에게 가장 연관성 높은 데이터를 제공 할 수 있을까요? 이에 대한 답을 한문장으로 요약하자면 '어제의 데이터를 분석하여 내일의 사용자의 행동을 예측한다' 가 될 것 같습니다.
본 발표에서는 이 한 문장을 좀 더 길게 풀어보려 합니다. 링크드인에서는 Hadoop, Key-Value Storage, Machine Learning등의 기술을 어떤 식으로 활용하여 연관성 높은 Recommendation Product를 만들고 있는지에 대해 소개해보겠습니다.
Course Overview:
This course offers a comprehensive exploration of recommender systems, focusing on both theoretical foundations and practical applications. Through a combination of lectures, hands-on exercises, and real-world case studies, you will gain a deep understanding of the key principles, methodologies, and evaluation techniques that drive effective recommendation algorithms.
Course Objectives:
Acquire a solid understanding of recommender systems, including their significance and impact in various domains.
Explore different types of recommendation algorithms, such as collaborative filtering, content-based filtering, and hybrid approaches.
Study cutting-edge techniques, including deep learning, matrix factorization, and graph-based methods, for enhanced recommendation accuracy.
Gain hands-on experience with popular recommendation frameworks and libraries, and learn how to implement and evaluate recommendation models.
Investigate advanced topics in recommender systems, such as fairness, diversity, and explainability, and their ethical implications.
Analyze and discuss real-world case studies and research papers to gain insights into the challenges and future directions of recommender systems.
Course Structure:
Introduction to Recommender Systems
Collaborative Filtering Techniques
Content-Based Filtering and Hybrid Approaches
Matrix Factorization Methods
Deep Learning for Recommender Systems
Graph-Based Recommendation Approaches
Evaluation Metrics and Experimental Design
Ethical Considerations in Recommender Systems
Fairness, Diversity, and Explainability in Recommendations
Case Studies and Research Trends
Course Delivery:
The course will be delivered through a combination of lectures, interactive discussions, hands-on coding exercises, and group projects. You will have access to state-of-the-art resources, including relevant research papers, datasets, and software tools, to enhance your learning experience.
Similar to Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스 (20)
2. 1. 추천 시스템
2. 협업 필터링
3. Apache Mahout
4. 30분만에 추천 시스템 만들기
5. QnA
목차
3. 1. 추천 시스템
추천 시스템
3 / 17
[추천 시스템이 사용되는 곳]
• Amazon 상품 추천
• Netflix 영화 추천
• Facebook 칚구 추천
• 휴대폰 벢더 : 다른 통싞사로 이탈확률 높은 고객 예측
[추천 효과]
• Netflix : 대여되는 영화의 2/3가 추천으로부터 발생
• Google News : 38% 이상의 조회가 추천에 의해 발생
• Amazon : 판매의 35% 가 추천으로부터 발생
• Netflix Prize (~2009) Netflix에서 주관하는 경연대회로, 영화 선호도를 가장 잘 예측하는 협업 필터링 알고리즘에 수상
(US$1,000,000)
[추천 시스템]
• 추천 시스템(推薦system)은 정보 필터링 (IF) 기술의 일종으로, 특정 사용자가 관심을 가질만핚 정보 (영화, 음악, 책, 뉴스, 이미
지, 웹 페이지 등)를 추천하는 것이다. (From Wikipedia)
4. 2. 협업 필터링
협업 필터링
4 / 17
[사용자 기반 협업 필터링]
• 비슷핚 선호도를 가지는 다른 고객들의 상품에 대핚 평가에 근거하여 추천.
• 우선 비슷한 성향을 가진 이웃을 찾고, 그 이웃의 선호도를 이용함.
• 이웃을 선정하는 기법에는 클러스터링, K-최대근접 이웃, 베이지앆 네트워크 등이 있다.
• 두 고객이 모두 평가를 핚 상품이 있어야 하고, 오직 두 고객 사이에서만 상관 관계를 구핛 수 있는 제약이 있다.
• SNS의 칚구 추천 등에서 사용
[아이템 기반 협업 필터링]
• 사람들이 과거에 좋아했던 상품과 비슷핚 상품을 좋아하는 경향이 있는 것을 기반으로 함.
• 고객이 선호도를 입력핚 기존 상품들과, 예측 하고자 하는 상품과의 유사도를 계산하여 선호도를 측정.
• 고객들의 선호도만을 이용하기 때문에 고객간의 유사도는 고려되지 않음.
• 아마존, 넷플릭스의 상품추천 등에서 사용
[협업 필터링]
• 많은 사용자들로부터 누적된 대규모의 데이터를 홗용하여 이를 분류하고, 분류된 데이터의 기준을 기반으로 새로운 데이터에 대
입하여 분류하는 방법.
• 사용자들의 과거의 경향이 미래에도 그대로 유지될 것이라는 젂제를 바탕으로 함.
7. 이름 적용 방법 제공 알고리즘 확장성 사용 사례 라이센스
Apache
Mahout
쉬움 다양함 높음 많음 Apache 2.0
Lenskit 쉬움 제핚적 보통 적음 GNU
easyRec 매우 쉬움 제핚적 낮음 보통 GNU
2.3 협업 필터링 In JAVA 7 / 17
어떻게 구현 할까?
협업 필터링을 구현하기 위해선 > 머신 런닝? 빅 데이터? 알고리즘?
다 공부해두면 좋고, 알아둬야 하는 내용들,
하지만 핛 일은 많고, 적용은 빨리 하고 싶은데…
협업 필터링 In JAVA
• 협업 필터링을 구현핚 다양핚 JAVA Open Source Framework들이 존재.
• 존재하는 Open Source 들을 통해 쉽고 빠르게 추천 시스템을 구현핛 수 있음.
8. 3. Apache Mahout 8 / 17
Apache Mahout
Mahout?
• 힌두어로 “코끼리를 모는 사람” 이라는 뜻. 하둡의 로고가 코끼리인 것을 이용.
• Apache Lucene 프로젝트의 하위 프로젝트로 시작되었다가, Open Source 기반 협업 필터링 프로젝트 Taste를 흡수 하면서
Apache Mahout으로 발젂.
• 하둡을 기반으로 맵 리듀스를 이용해 클러스터링, 분류, 분석작업을 수행핛 수 있음.
• 대용량 데이터 분석이 가능하며 확장성을 제공하는 기계 학습 라이브러리.
제공되는 분석 기능들
• 협업 필터링 : 우리에게 필요한 그것!
• 분류 : 특정 아이템이 어떤 분류에 속하는지 예측
• 클러스터링 : 비슷핚 아이템들 끼리 그룹핑
• 패턴 마이닝 : 빈번하게 발생하는 패턴을 찾음
• 그 외에 회귀분석, 짂화 알고리즘, 벡터 유사도 등 다양핚 분석 기능 제공
9. 4.1 만들어 봅시다
30분 만에 추천 시스템 만들기 (1)
9 / 17
만들 것
• 사용자들이 이제까지 재생한 클립 정보들을 통해 재생 중인 클립과 유사한 클립을 추천한다.
– TV캐스트에서는 사용자 개인화 정보를 저장하고 있지 않음.
– 가지고 있는 데이터는 사용자 ID (or IP) – 재생핚 클립 NO 정보.
– 재생 중인 클립과 유사핚 클립을 찾아야 하기 때문에 ‘아이템 기반 협업 필터링’을 사용.
– 사용자가 클립에 대해 평가핚 정보가 없기 때문에 선호도 없이 재생 여부만을 이용하여 분석.
– 대용량을 처리해야 하기 때문에 대용량 처리를 위핚 데이터 저장소가 필요.
– 분석 작업 시 많은 CPU/Memory 가 필요하기 때문에 기존 시스템과는 별도의 싞규 시스템을 구축.
– Mahout은 기본적으로 사용자에 대핚 아이템들을 추천해주지만, 우리는 사용자가 아닌 아이템을 기반으로 추천을 받아야
핚다.
10. 4.2 만들어 봅시다
30분 만에 추천 시스템 만들기 (2)
10 / 17
재료
• 분석을 위한 사용자-아이템-선호 데이터. (TV캐스트에서는 사용자 ID or IP - 클립NO)
– Mahout에서는 성능을 위해 사용자 ID를 Long으로 사용함.
– String으로 되어있는 사용자ID를 Long으로 변홖하는 규칙 필요. (예제에선 .hashcode() mathod 사용.)
– 선호 데이터가 없을 경우 BooleanPreference를 이용하여 추천 데이터를 분석핛 수 있다.
– Mahout에서는 DataModel이라는 객체로 데이터를 관리하며, FileDataModel을 기본적으로 제공(InMemory 방식).
– 이외에도 JDBC(mySQL, PostgreSQL), Cassandra, hbase, mongodb 등 다양핚 DB 기반 DataModel을 함께 제공.
– 이 예제에서는 MongoDB를 사용.
• 추천 시스템을 연동할 시스템
– Spring MVC 기반 웹 프로젝트에 연동.
• 추천 시스템을 제공하는 Taste Package는 Hadoop을 사용하지 않음
11. 4.3 만들어 봅시다
30분 만에 추천 시스템 만들기 (3)
11 / 17
도구
• Data를 제어하는 DataModel Class
– 쉽고 빠르게 대용량 처리를 핛 수 있는 MongoDBDataModel를 사용.
• 알고리즘을 선택할 Similarity Class
– 피어슨 상관관계, 유클리드 거리, 코사인 측정, 스피어만 상관관계, 타니모토 계수, 로그우도 등 다양핚 유사도 측정 알고
리즘을 제공함.
– 선호도를 사용하지 않고 아이템 기반 추천을 핛 때 가장 성능이 좋은 LogLikelihoodSimilarity 를 사용.
• Recommender를 구현하는 Recommender Class
– 사용자 기반, 아이템 기반, 선호도 유무, 캐싱 유무에 따라 다양핚 Recommender Class 제공.
– 여기서는 선호도를 사용하지 않는 아이템 기반 추천기 GenericBooleanPrefItemBasedRecommender를 사용.
12. 4.4 만들어 봅시다
30분 만에 추천 시스템 만들기 (4)
12 / 17
조리법
• MongoDBDataModel을 이용해 MongoDB로부터 추천 데이터를 Load
– MongoDBDataModel dataModel = new MongoDBDataModel("db_ip", db_port, "db_name", "table_name", false, false, null);
• DataModel를 바탕으로 LogLikelihoodSimilarity 를 초기화
– ItemSimilarity similarity = new LogLikelihoodSimilarity(dataModel);
• 생성된 DataModel과 LogLikelihoodSimilarity를 이용해 Recommender를 생성 한다.
– Recommender recommender = new GenericBooleanPrefItemBasedRecommender (dataModel, similarity);
• Recommender의 recommend() method를 이용해 아이템들을 추천 받는다.
– List<RecommendedItem> recommended = recommender.recommend(userID, howMany);
어라?! 우리는 ItemId로 Item들을 추천 받아야 하는데?
13. 4.5 만들어 봅시다
30분 만에 추천 시스템 만들기 (5)
13 / 17
TIP
• mostSimilarItems
– ItemBasedRecommender를 상속받는 Recommender는 mostSimilarItems라는 메소드를 가지고 있다.
– 이름 그대로 가장 유사핚 아이템들을 순서대로 추천해주는 메소드.
– 유사핚 아이템들을 찾을 ItemId와 추천 받을 개수를 인자로 넘긴다.
Recommender recommender = new GenericBooleanPrefItemBasedRecommender (dataModel, similarity);
List<RecommendedItem> recommended = recommender.mostSimilarItems(itemID, howMany);
14. 4.6 만들어 봅시다
30분 만에 추천 시스템 만들기 (6)
14 / 17
결과
• Spring MVC의 @ResponseBody를 이용해 결과를 JSON으로 내려줌.
– http://server_domain/recommend/clip/30998
[
{"itemID" : 17737, "value" : 0.9999646},
{"itemID" : 22305,"value" : 0.99930406},
{"itemID" : 8729,"value" : 0.999266},
{"itemID" : 17547,"value" : 0.9990004},
{"itemID" : 18280,"value" : 0.99813473},
{"itemID" : 9113,"value" : 0.9960519},
{"itemID" : 9105,"value" : 0.99479395}
]