SlideShare a Scribd company logo
Machine Learning explained with
Examples
Heli Helskyaho
Copyright © Miracle Finland Oy
* Graduated from University of Helsinki (Master of Science, computer science), currently a doctoral
student, researcher and lecturer (databases, Big Data, Multi-model Databases, methods and tools for
utilizing semi-structured data for decision making) at University of Helsinki
* Worked with Oracle products since 1993, worked for IT since 1990
* Data and Database!
* CEO for Miracle Finland Oy
* Oracle ACE Director, Oracle Groundbreaker Ambassador
* Ambassador for EOUC (EMEA Oracle Users Group Community)
* Listed as one of the TOP 100 influencers on IT sector in Finland (2015, 2016, 2017, 2018)
* Public speaker and an author
* Author of the book Oracle SQL Developer Data Modeler for Database Design Mastery (Oracle Press,
2015), co-author for Real World SQL and PL/SQL: Advice from the Experts (Oracle Press, 2016)
Introduction, Heli
Copyright © Miracle Finland Oy
3 Membership Tiers
• Oracle ACE Director
• Oracle ACE
• Oracle ACE Associate
bit.ly/OracleACEProgram
500+ Technical Experts
Helping Peers Globally
Connect:
Nominate yourself or someone you know: acenomination.oracle.com
@oracleace
Facebook.com/oracleaces
oracle-ace_ww@oracle.com
Copyright © Miracle Finland Oy
What is Machine Learning?
* An important part of Artificial Intelligence (AI)
* Machine learning (ML) teaches computers to learn from experience
(algorithms)
* “field of study that gives computers the ability to learn without being
explicitly programmed“ -- Arthur Samuel, 1959
* A systematic study of algorithms and systems that improve their
knowledge or performance with experience
Copyright © Miracle Finland Oy
* Spam filters, Log filters/alarms
* Data analytics
* Image recognition, Speech recognition
* Medical diagnosis
* Robotics
* Fraud protection/detection (credit card)
* Product / music / movie recommendation
* …
Real life use cases for ML
Copyright © Miracle Finland Oy
* ”How to serve customers better in simple tasks like
* - finding the bus schedule
* - order pizza
* - help students with their courses, studies etc
* - ”therapy” with Woebot
* …”
A simple example, Chatbot
Copyright © Miracle Finland Oy
* Online shopping (Amazon, Search, recommendations)
* Voice-to-Text, Smart Personal Assistants (mobile services: ”recipe for
bread”, ”find the nearest grocery”)
* Siri, Google Assistant, Alexa, Echo, Cortana,…
* Facebook
* …
Real life use cases for ML
Copyright © Miracle Finland Oy
* The face recognition (demo) for our house alarm system
* (Python)
* ”If there are human faces, take a photo, identify those and let me know
how many faces there are.”
My real life use case
Copyright © Miracle Finland Oy
* Oracle Database Advanced Analytics (OAA) =
* Oracle DB + Oracle Data Mining (ODM) (+Data Miner GUI in Oracle SQL
Developer) +
* Oracle R Enterprise (ORE)
* Predictive Analytics with Oracle Data Mining (ODM)
* Predictive Queries with Oracle Analytic Functions
* “Oracle Machine Learning” is a Zeppelin based SQL notebook that is
available with ADWC
In-database Machine Learning
Copyright © Miracle Finland Oy
* Why to move the data?
* It usually is a lot of data…
* Preparing the data is the hard part (80/20)
* Database is the natural environment for handling data
* Maybe you already know SQL and PL/SQL?
* You can use APEX for visualizing the data and the process
* The deployment (table, view, PL/SQL Package, Function, Procedure,…) is easily
used with many technologies
* …
Why in-database?
Copyright © Miracle Finland Oy
* Oracle SQL Developer is a free tool from Oracle
* Has an add-on called Data Miner
* Advanced analytics (Data Miner uses that) is a licensed product (in the EE
database separately licensed, in the Cloud: Database Service either High
Performace Package or Extreme Performance Package)
* Oracle Data Miner GUI Installation Instructions
http://www.oracle.com/technetwork/database/options/advanced-
analytics/odm/odmrinstallation-2080768.html
* Tutorial
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/BigDataDM/
ODM12c-BDL4.html
Oracle SQL Developer, Data Miner
Copyright © Miracle Finland Oy
* ”Which customers would most likely buy the insurance?”
* (SQL Developer)
The Task
Copyright © Miracle Finland Oy
Oracle SQL Developer demo
Copyright © Miracle Finland Oy
* ”Students that will enroll?”
* (Oracle Autonomous DW)
The Task
Copyright © Miracle Finland Oy
* Apache Zeppelin based Machine Learning SQL Notebook
SQL, Oracle Autonomous DW
Copyright © Miracle Finland Oy
SQL, Oracle Autonomous DW
Copyright © Miracle Finland Oy
* ”Predict an overall rating for a beer.”
* (SQL, PL/SQL, APEX)
The Task
Copyright © Miracle Finland Oy
SQL, APEX
Copyright © Miracle Finland Oy
”What is the probability for beer 43548 to get overall 5?”
SELECT PREDICTION_PROBABILITY(Beer_DT, 5 USING *) beer_overall_prob
FROM beer_test
WHERE idindex = 43658;
1.5087463556851313E-001
SELECT PREDICTION_PROBABILITY(Beer_DT, 5 USING STYLE) beer_overall_prob
FROM beer_test
WHERE idindex = 43658;
2.4140018157974377E-001
USING: Predictors and/or Expressions
Real-time scoring, single record scoring
Copyright © Miracle Finland Oy
”What are the brewers that I should contact (making most of the overall 5
beers)?"
SELECT brewerid, count(*)
FROM beer_test
WHERE PREDICTION(Beer_DT USING *) = 5
group by brewerid
order by 2 desc;
Real-time scoring, batch scoring
Copyright © Miracle Finland Oy
* “Predict the Telco customers about to leave”
* (Python)
Task
Copyright © Miracle Finland Oy
* ”Predict the house prices”
* (R)
Task
Copyright © Miracle Finland Oy
An example of something more complicated
Copyright © Miracle Finland Oy
Kim Hazelwood, Sarah Bird, David Brooks, Soumith Chintala, Utku Diril, Dmytro Dzhulgakov,
Mohamed Fawzy, Bill Jia, Yangqing Jia, Aditya Kalro, James Law, Kevin Lee, Jason Lu, Pieter
Noordhuis, Misha Smelyanskiy, Liang Xiong, Xiaodong Wang, “Applied Machine Learning at
Facebook: A Datacenter Infrastructure Perspective”, Facebook, Inc.
X. He, J. Pan, O. Jun, T. Xu, B. Liu, T. Xu, Y. Shi, A. Atallah, R. Herbrich, S. Bowers, and J.
Quinonero Candela, “Practical lessons from predicting clicks on ads at facebook,” in
Proceedings of the Eighth International Workshop on Data Mining for Online Advertising, ser.
ADKDD’14. New York, NY, USA: ACM, 2014, pp. 5:1–5:9.
J. Dunn, “Introducing FBLearner flow: Facebook’s AI backbone,” May 2016, https://fb.me/dunn
2016.
https://code.facebook.com/posts/1072626246134461/introducing-fblearner-flow-facebook-s-ai-
backbone/
Example Facebook, References
Copyright © Miracle Finland Oy
* “Give people the power to build community and bring the world closer together.”
* Facebook connects more than two billion people as of December 2017
* Could not be done without ML
* The massive amount of data required by machine learning services presents challenges to
Facebook’s datacenters.
* Several techniques are used to efficiently feed data to the models including decoupling of
data feed and training, data/compute co-location, and networking optimizations.
* Disaster recovery planning is essential
* actively evaluating and prototyping new hardware solutions while remaining cognizant of
game changing algorithmic innovations
Facebook’s mission
Copyright © Miracle Finland Oy
* News Feed ranking
* Ads
* Search
* Sigma
* Lumos
* Facer
* Language Translation
* Speech Recognition
Facebook, some use cases for ML, the Products
Copyright © Miracle Finland Oy
* ML is used for
* ranking and personalizing News Feed stories
* filtering out offensive content
* highlighting trending topics
* ranking search results, and much more.
* General models are trained to determine various user and environmental factors
that should ultimately determine the rank order of content.
* The model is used to generate a personalized set of the best posts, images, and
other content to display from thousands of candidates, and the best ordering of
this chosen content.
News Feed
Copyright © Miracle Finland Oy
* Online advertising allows advertisers to only bid and pay for measurable user
responses, such as clicks on ads.
* As a consequence, click prediction systems are central to most online advertising
systems.
* General Ads models are trained to learn how user traits, user context, previous
interactions, and advertisement attributes can be most predictive of the
likelihood of clicking on an ad, visiting a website, and/or purchasing a product.
* Inputs are run through a trained model to immediately determine which ads to
display to a particular Facebook user.
Ads
Copyright © Miracle Finland Oy
* The click prediction system needs to be robust and adaptive, and capable
of learning from massive volumes of data.
* At Facebook they use a model which combines decision trees with logistic
regression
* Based on their experience: the most important thing is to have the right
features (those capturing historical information about the user or ad
dominate other types of features) and the right model
* Measures: the accuracy of prediction
Predicting the Clicks
Copyright © Miracle Finland Oy
X. He, J. Pan, O. Jun, T. Xu, B. Liu, T. Xu, Y. Shi, A. Atallah, R. Herbrich, S. Bowers, and J. Quinonero Candela, “Practical lessons from predicting clicks on ads at facebook,” in
Proceedings of the Eighth International Workshop on Data Mining for Online Advertising, ser. ADKDD’14. New York, NY, USA: ACM, 2014, pp. 5:1–5:9.
Copyright © Miracle Finland Oy
* Launches a series of distinct and specialized sub-searches to the various
verticals, e.g., videos, photos, people, events, etc.
* A classifier layer is run atop the various search verticals to predict which
of the many verticals to search (searching all possible verticals would be
inefficient)
* The classifier and these search verticals consist of
* an offline stage to train the models
* and an online stage to run the models and perform the classification
and search
Search
Copyright © Miracle Finland Oy
* General classification and anomaly detection framework that is used for a
variety of internal applications (site integrity, spam detection, payments,
registration, unauthorized employee access, and event
recommendations)
* Sigma includes hundreds of distinct models running in production everyday
* each model is trained to detect anomalies (e.g. classify content)
Sigma
Copyright © Miracle Finland Oy
* Extract high-level attributes and embeddings from an image and its
content
* That data can be used as input to other products and services
* for example as it were text.
Lumos
Copyright © Miracle Finland Oy
* Facebook’s face detection and recognition framework
* Given an image
* finds all of the faces in that image
* runs a user-specific facial-recognition algorithm to determine the likelihood of
that face belonging to one of your top-N friends who have enabled face
recognition
* This allows Facebook to suggest which of your friends you might want to
tag within the photos you upload.
Facer
Copyright © Miracle Finland Oy
* Service that manages internationalization of Facebook content
* Supports translations for more than 45 languages (as the source or
target language)
* supports more than 2000 translation directions
* serves 4.5B translated post impressions every day
* Each language pair direction has its own model
* multi-language models are being considered
Language Translation
Copyright © Miracle Finland Oy
* Converts audio streams into text
* Provides automated captioning for video
* Most streams are English language
* other languages will be available in future
* Additionally, non-language audio events are also detected with a similar
system (simpler model).
Speech Recognition
Copyright © Miracle Finland Oy
Algorithms Facebook uses for these services
Copyright © Miracle Finland Oy
How do they do all this at Facebook?
Copyright © Miracle Finland Oy
FBLearner Platform
Copyright © Miracle Finland Oy
* The starting point for a ML modeling task is to gather and generate
features.
* The Feature Store is a catalog of several feature generators
* can be used both for training and real-time prediction
* serves as a marketplace that multiple teams can use to share and discover
features
FBLearner Feature Store
Copyright © Miracle Finland Oy
* Facebook’s machine learning platform for model training
* Workflows: A workflow is a single pipeline defined within FBLearner Flow and is the entry point for all
machine learning tasks.
* Each workflow performs a specific job, such as training and evaluation of a specific model.
* Workflows are defined in terms of operators and can be parallelized.
* Operators: Operators are the building blocks of workflows
* In FBLearner Flow, operators are the smallest unit of execution and run on a single machine.
* Channels: Channels represent inputs and outputs, which flow between operators within a workflow.
* All channels are typed using a custom type system.
* Flow has tooling for experiment management.
* The user interface keeps track of all of the artifacts and metrics generated by each workflow execution
or experiment.
* The user interface makes it simple to compare and manage these experiments.
FBLearner Flow
Copyright © Miracle Finland Oy
* The platform consists of three core components:
* an authorship and execution environment for custom distributed workflows
* an experimentation management UI for launching experiments and viewing
results
* numerous predefined pipelines for training the most commonly used machine
learning algorithms at Facebook.
FBLearner Flow
Copyright © Miracle Finland Oy
* Facebook’s internal inference engine that uses the models trained in FBLearner
Flow to provide predictions in real time.
* Can be used
* as a multitenancy service
* or as a library that can be integrated in product specific backend services
* Is used by multiple product teams at Facebook, many of which require low latency
solutions.
* The direct integration between Flow and Predictor also helps with
* running online experiments
* managing multiple versions of models in productions
FBLearner Predictor
Copyright © Miracle Finland Oy
* Two distinct but synergistic frameworks for deep learning at Facebook:
* PyTorch, which is optimized for research
* Caffe2, which is optimized for production
Frameworks for deep learning
Copyright © Miracle Finland Oy
* PyTorch is the framework for AI research at Facebook which enables rapid
experimentation
* Flexibility
* Debugging
* Dynamic neural networks
* Not optimized for production and mobile deployments (Python)
* When research projects produce valuable results, the models need to be
transferred to production.
* Traditionally, rewriting the training pipeline in a product environment with other
frameworks.
PyTorch
Copyright © Miracle Finland Oy
* Facebook’s in-house production framework
* For training and deploying large-scale machine learning models
* Focuses on several key features required by products:
* Performance
* cross-platform support
* coverage for fundamental machine learning algorithms (convolutional neural
networks (CNNs), recurrent networks (RNNs), and multi-layer perceptrons
(MLPs)) and up to tens of billions of parameters
Caffe2
Copyright © Miracle Finland Oy
* Different tools are better for different subset of problems and have varying tradeoffs on
flexibility, performance, and supported platforms . As a result, there should be a way to exchange
trained models between different frameworks or platforms.
* ONNX is a format to represent deep learning models in a standard way to enable interoperability
across different frameworks and vendor-optimized libraries.
* ONNX is designed as an open specification
* Within Facebook, ONNX is used for transferring research models from the PyTorch environment
to high-performance production environment in Caffe2.
* ONNX provides the ability to automatically capture and translate static parts of the models.
* An additional toolchain facilitates transfer of dynamic graph parts from Python by either mapping
them to control-flow primitives in Caffe2 or reimplementing them in C++ as custom operators.
Open Neural Network Exchange, ONNX
Copyright © Miracle Finland Oy
Caffe2 and PyTorch join forces to create a Research + Production platform
PyTorch 1.0:
https://caffe2.ai/blog/2018/05/02/Caffe2_PyTorch_1_0.html
“We realized that in order to deliver the best user experience, it makes
sense to combine the beneficial traits of Caffe2 and PyTorch into a single
package and enable a smooth transition from fast prototyping to fast
execution. It’d also improve our developer efficiency by more easily
utilizing a shared set of tools.”
Caffe2 and PyTorch projects are merging
Copyright © Miracle Finland Oy
* success is predicated on the availability of extensive, high-quality data
* complex preprocessing logic is applied to ensure that data is cleaned and
normalized to allow efficient transfer and easy learning
* The ability to rapidly process and feed these data to the training machines
is important for ensuring that we have fast and efficient offline training.
* These impose very high resource requirement especially on storage,
network, and CPU.
* actively evaluating and prototyping new hardware solutions while
remaining cognizant of game changing algorithmic innovations
The success factors 1/2
Copyright © Miracle Finland Oy
* https://research.fb.com/category/machine-learning/
Facebook, research
Copyright © Miracle Finland Oy
* Knowing what to measure to know what to improve
The success factors 2/2
Copyright © Miracle Finland Oy
* Number of positives, number of negatives, number of true positives, number of
false positives, number of true negatives, number of false negatives
* Portion of positives, portion of negatives
* Class ratio
* Accuracy, Error rate
* ROC curve, coverage curve,
* …
* It all depends on how we define the performance for the answer to our
question (experiment): experimental objective
What to measure?
Copyright © Miracle Finland Oy
* “we noticed that the largest improvements in accuracy often came from
quick experiments, feature engineering, and model tuning rather than
applying fundamentally different algorithms”
* An engineer may need to attempt hundreds of experiments before
finding a successful new feature or set of hyperparameters.
Facebook
Copyright © Miracle Finland Oy
* AI and machine learning is here and it’s the future
* So many interesting areas to learn
* Pick your area and START LEARNING!
The future and now!
Copyright © Miracle Finland Oy
* Python
* R
* C/C++
* Java
* JavaScript
* Julia, Scala, Ruby, Octave, MATLAB, SAS
* …
* https://medium.com/towards-data-science/what-is-the-best-programming-language-for-
machine-learning-a745c156d6b7
So many more languages to learn…
Copyright © Miracle Finland Oy
* Reinforcement learning
* the machine or software agent learns based on feedback from the environment
* Preference learning
* inducing predictive preference models from empirical data
* Multi-task learning
* multiple learning tasks are solved at the same time, while exploiting commonalities
and differences across tasks
* Online machine learning
* data becomes available in a sequential order and is used to update our best
predictor for future data at each step
And there’s so much more in Machine Learning
too!
Copyright © Miracle Finland Oy
* Active learning
* A learning algorithm is able to interactively query the user (or some other
information source) to obtain the desired outputs at new data points
* Deep learning
* Images and anything that is in ”several layers”
* Adaptive Intelligence
* People and machines
Copyright © Miracle Finland Oy
* ML can be used ”everywhere”:
* Spam filters
* Log filters (and alarms)
* Data analytics
* Image recognition
* Speech recognition
* Medical diagnosis
* Robotics
* Chatbots
* …
Conclusion
Copyright © Miracle Finland Oy
* Facebook uses ML ”everywhere”
* News Feed ranking
* Ads
* Search
* Sigma
* Lumos
* Facer
* Language Translation
* Speech Recognition
Conclusion
Copyright © Miracle Finland Oy
* You can use ML ”everywhere”
* Start small and when you learn more do more
* Define a Task and let ML solve it
* Machines are not taking our jobs but helping us to do more interesting things
* With ML we can understand our data better and make better decisions
Conclusion
THANK YOU!
QUESTIONS?
Email: heli@miracleoy.fi
Twitter: @HeliFromFinland
Blog: Helifromfinland.com

More Related Content

PPT
2013-10-10 robust and trusted crowd-sourcing and crowd-tasking in the future ...
PPT
Neuro Cognitive Platform
PDF
[db tech showcase Tokyo 2018] #dbts2018 #B16 『The Basics of Machine Learning』
PDF
The Ultimate Things About IoT
PDF
BM_KB_PK-slides.pdfssssssssssssssssssssssssssssssssss
PPT
EDF2012 Stefano Bertolo - Future European activities and funding perspectiv...
PDF
Awareness on IoT Adoption for SMEs and Business Intelligence
PDF
[db tech showcase Tokyo 2018] #dbts2018 #B36 『Design Your Databases straight ...
2013-10-10 robust and trusted crowd-sourcing and crowd-tasking in the future ...
Neuro Cognitive Platform
[db tech showcase Tokyo 2018] #dbts2018 #B16 『The Basics of Machine Learning』
The Ultimate Things About IoT
BM_KB_PK-slides.pdfssssssssssssssssssssssssssssssssss
EDF2012 Stefano Bertolo - Future European activities and funding perspectiv...
Awareness on IoT Adoption for SMEs and Business Intelligence
[db tech showcase Tokyo 2018] #dbts2018 #B36 『Design Your Databases straight ...

Similar to 事例を通じて機械学習とは何かを説明する (20)

PDF
IoT : Whats in it for me?
PPT
Search & Discovery Patterns, a UIE Virtual Seminar
PDF
Interesting Thing about Internet of Things
PDF
Mark logic for dita
PDF
ISCRAM Summer School lecture Prof. Ralph Morelli
 
PDF
Artificial Intelligence and Machine Learning with the Oracle Data Science Cloud
PPTX
Extended Reality - VR, AR, MR Applications and Future
PDF
Service goes accessible_2013_sh
PDF
EUNIS 2025 - How to Clone Yourself to be Immortal with RAG AI - https://mikko...
PDF
Data Ninja Services - Incite West talk 2015
PDF
Big Data LDN 2018: HOW AUTOMATION CAN ACCELERATE THE DELIVERY OF MACHINE LEAR...
PPTX
Information landscapes – modelling your information assets (part 1 – as is)
PPTX
Big data analytic platform
PDF
Petri Martikainen MultiTouch Stanford Apr2009
PDF
Data science workshop
PDF
Mobile learning: current status, examples, challenges
PPT
Ornl IT
PPTX
Better Software, Better Research
PDF
OSINT: Open Source Intelligence - Rohan Braganza
PDF
Future of Data Strategy
IoT : Whats in it for me?
Search & Discovery Patterns, a UIE Virtual Seminar
Interesting Thing about Internet of Things
Mark logic for dita
ISCRAM Summer School lecture Prof. Ralph Morelli
 
Artificial Intelligence and Machine Learning with the Oracle Data Science Cloud
Extended Reality - VR, AR, MR Applications and Future
Service goes accessible_2013_sh
EUNIS 2025 - How to Clone Yourself to be Immortal with RAG AI - https://mikko...
Data Ninja Services - Incite West talk 2015
Big Data LDN 2018: HOW AUTOMATION CAN ACCELERATE THE DELIVERY OF MACHINE LEAR...
Information landscapes – modelling your information assets (part 1 – as is)
Big data analytic platform
Petri Martikainen MultiTouch Stanford Apr2009
Data science workshop
Mobile learning: current status, examples, challenges
Ornl IT
Better Software, Better Research
OSINT: Open Source Intelligence - Rohan Braganza
Future of Data Strategy
Ad

More from Insight Technology, Inc. (20)

PDF
グラフデータベースは如何に自然言語を理解するか?
PDF
Docker and the Oracle Database
PDF
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
PDF
仮想通貨ウォレットアプリで理解するデータストアとしてのブロックチェーン
PDF
MBAAで覚えるDBREの大事なおしごと
PDF
グラフデータベースは如何に自然言語を理解するか?
PDF
DBREから始めるデータベースプラットフォーム
PDF
SQL Server エンジニアのためのコンテナ入門
PDF
Lunch & Learn, AWS NoSQL Services
PDF
db tech showcase2019オープニングセッション @ 森田 俊哉
PDF
db tech showcase2019 オープニングセッション @ 石川 雅也
PDF
db tech showcase2019 オープニングセッション @ マイナー・アレン・パーカー
PPTX
難しいアプリケーション移行、手軽に試してみませんか?
PPTX
Attunityのソリューションと異種データベース・クラウド移行事例のご紹介
PPTX
そのデータベース、クラウドで使ってみませんか?
PPTX
コモディティサーバー3台で作る高速処理 “ハイパー・コンバージド・データベース・インフラストラクチャー(HCDI)” システム『Insight Qube』...
PDF
複数DBのバックアップ・切り戻し運用手順が異なって大変?!運用性の大幅改善、その先に。。
PPTX
Attunity社のソリューションの日本国内外適用事例及びロードマップ紹介[ATTUNITY & インサイトテクノロジー IoT / Big Data フ...
PPTX
レガシーに埋もれたデータをリアルタイムでクラウドへ [ATTUNITY & インサイトテクノロジー IoT / Big Data フォーラム 2018]
PPTX
エンタープライズでのAI活用を支援する新世代データウェアハウスのあり方[ATTUNITY & インサイトテクノロジー IoT / Big Data フォー...
グラフデータベースは如何に自然言語を理解するか?
Docker and the Oracle Database
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
仮想通貨ウォレットアプリで理解するデータストアとしてのブロックチェーン
MBAAで覚えるDBREの大事なおしごと
グラフデータベースは如何に自然言語を理解するか?
DBREから始めるデータベースプラットフォーム
SQL Server エンジニアのためのコンテナ入門
Lunch & Learn, AWS NoSQL Services
db tech showcase2019オープニングセッション @ 森田 俊哉
db tech showcase2019 オープニングセッション @ 石川 雅也
db tech showcase2019 オープニングセッション @ マイナー・アレン・パーカー
難しいアプリケーション移行、手軽に試してみませんか?
Attunityのソリューションと異種データベース・クラウド移行事例のご紹介
そのデータベース、クラウドで使ってみませんか?
コモディティサーバー3台で作る高速処理 “ハイパー・コンバージド・データベース・インフラストラクチャー(HCDI)” システム『Insight Qube』...
複数DBのバックアップ・切り戻し運用手順が異なって大変?!運用性の大幅改善、その先に。。
Attunity社のソリューションの日本国内外適用事例及びロードマップ紹介[ATTUNITY & インサイトテクノロジー IoT / Big Data フ...
レガシーに埋もれたデータをリアルタイムでクラウドへ [ATTUNITY & インサイトテクノロジー IoT / Big Data フォーラム 2018]
エンタープライズでのAI活用を支援する新世代データウェアハウスのあり方[ATTUNITY & インサイトテクノロジー IoT / Big Data フォー...
Ad

Recently uploaded (20)

PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PDF
Mega Projects Data Mega Projects Data
PPT
Quality review (1)_presentation of this 21
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
Global journeys: estimating international migration
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PDF
Introduction to Business Data Analytics.
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
1_Introduction to advance data techniques.pptx
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Mega Projects Data Mega Projects Data
Quality review (1)_presentation of this 21
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
STUDY DESIGN details- Lt Col Maksud (21).pptx
Global journeys: estimating international migration
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Introduction to Business Data Analytics.
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Introduction to Knowledge Engineering Part 1
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Supervised vs unsupervised machine learning algorithms
oil_refinery_comprehensive_20250804084928 (1).pptx
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
1_Introduction to advance data techniques.pptx
IBA_Chapter_11_Slides_Final_Accessible.pptx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Business Ppt On Nestle.pptx huunnnhhgfvu

事例を通じて機械学習とは何かを説明する

  • 1. Machine Learning explained with Examples Heli Helskyaho
  • 2. Copyright © Miracle Finland Oy * Graduated from University of Helsinki (Master of Science, computer science), currently a doctoral student, researcher and lecturer (databases, Big Data, Multi-model Databases, methods and tools for utilizing semi-structured data for decision making) at University of Helsinki * Worked with Oracle products since 1993, worked for IT since 1990 * Data and Database! * CEO for Miracle Finland Oy * Oracle ACE Director, Oracle Groundbreaker Ambassador * Ambassador for EOUC (EMEA Oracle Users Group Community) * Listed as one of the TOP 100 influencers on IT sector in Finland (2015, 2016, 2017, 2018) * Public speaker and an author * Author of the book Oracle SQL Developer Data Modeler for Database Design Mastery (Oracle Press, 2015), co-author for Real World SQL and PL/SQL: Advice from the Experts (Oracle Press, 2016) Introduction, Heli
  • 3. Copyright © Miracle Finland Oy
  • 4. 3 Membership Tiers • Oracle ACE Director • Oracle ACE • Oracle ACE Associate bit.ly/OracleACEProgram 500+ Technical Experts Helping Peers Globally Connect: Nominate yourself or someone you know: acenomination.oracle.com @oracleace Facebook.com/oracleaces oracle-ace_ww@oracle.com
  • 5. Copyright © Miracle Finland Oy What is Machine Learning? * An important part of Artificial Intelligence (AI) * Machine learning (ML) teaches computers to learn from experience (algorithms) * “field of study that gives computers the ability to learn without being explicitly programmed“ -- Arthur Samuel, 1959 * A systematic study of algorithms and systems that improve their knowledge or performance with experience
  • 6. Copyright © Miracle Finland Oy * Spam filters, Log filters/alarms * Data analytics * Image recognition, Speech recognition * Medical diagnosis * Robotics * Fraud protection/detection (credit card) * Product / music / movie recommendation * … Real life use cases for ML
  • 7. Copyright © Miracle Finland Oy * ”How to serve customers better in simple tasks like * - finding the bus schedule * - order pizza * - help students with their courses, studies etc * - ”therapy” with Woebot * …” A simple example, Chatbot
  • 8. Copyright © Miracle Finland Oy * Online shopping (Amazon, Search, recommendations) * Voice-to-Text, Smart Personal Assistants (mobile services: ”recipe for bread”, ”find the nearest grocery”) * Siri, Google Assistant, Alexa, Echo, Cortana,… * Facebook * … Real life use cases for ML
  • 9. Copyright © Miracle Finland Oy * The face recognition (demo) for our house alarm system * (Python) * ”If there are human faces, take a photo, identify those and let me know how many faces there are.” My real life use case
  • 10. Copyright © Miracle Finland Oy * Oracle Database Advanced Analytics (OAA) = * Oracle DB + Oracle Data Mining (ODM) (+Data Miner GUI in Oracle SQL Developer) + * Oracle R Enterprise (ORE) * Predictive Analytics with Oracle Data Mining (ODM) * Predictive Queries with Oracle Analytic Functions * “Oracle Machine Learning” is a Zeppelin based SQL notebook that is available with ADWC In-database Machine Learning
  • 11. Copyright © Miracle Finland Oy * Why to move the data? * It usually is a lot of data… * Preparing the data is the hard part (80/20) * Database is the natural environment for handling data * Maybe you already know SQL and PL/SQL? * You can use APEX for visualizing the data and the process * The deployment (table, view, PL/SQL Package, Function, Procedure,…) is easily used with many technologies * … Why in-database?
  • 12. Copyright © Miracle Finland Oy * Oracle SQL Developer is a free tool from Oracle * Has an add-on called Data Miner * Advanced analytics (Data Miner uses that) is a licensed product (in the EE database separately licensed, in the Cloud: Database Service either High Performace Package or Extreme Performance Package) * Oracle Data Miner GUI Installation Instructions http://www.oracle.com/technetwork/database/options/advanced- analytics/odm/odmrinstallation-2080768.html * Tutorial http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/BigDataDM/ ODM12c-BDL4.html Oracle SQL Developer, Data Miner
  • 13. Copyright © Miracle Finland Oy * ”Which customers would most likely buy the insurance?” * (SQL Developer) The Task
  • 14. Copyright © Miracle Finland Oy Oracle SQL Developer demo
  • 15. Copyright © Miracle Finland Oy * ”Students that will enroll?” * (Oracle Autonomous DW) The Task
  • 16. Copyright © Miracle Finland Oy * Apache Zeppelin based Machine Learning SQL Notebook SQL, Oracle Autonomous DW
  • 17. Copyright © Miracle Finland Oy SQL, Oracle Autonomous DW
  • 18. Copyright © Miracle Finland Oy * ”Predict an overall rating for a beer.” * (SQL, PL/SQL, APEX) The Task
  • 19. Copyright © Miracle Finland Oy SQL, APEX
  • 20. Copyright © Miracle Finland Oy ”What is the probability for beer 43548 to get overall 5?” SELECT PREDICTION_PROBABILITY(Beer_DT, 5 USING *) beer_overall_prob FROM beer_test WHERE idindex = 43658; 1.5087463556851313E-001 SELECT PREDICTION_PROBABILITY(Beer_DT, 5 USING STYLE) beer_overall_prob FROM beer_test WHERE idindex = 43658; 2.4140018157974377E-001 USING: Predictors and/or Expressions Real-time scoring, single record scoring
  • 21. Copyright © Miracle Finland Oy ”What are the brewers that I should contact (making most of the overall 5 beers)?" SELECT brewerid, count(*) FROM beer_test WHERE PREDICTION(Beer_DT USING *) = 5 group by brewerid order by 2 desc; Real-time scoring, batch scoring
  • 22. Copyright © Miracle Finland Oy * “Predict the Telco customers about to leave” * (Python) Task
  • 23. Copyright © Miracle Finland Oy * ”Predict the house prices” * (R) Task
  • 24. Copyright © Miracle Finland Oy An example of something more complicated
  • 25. Copyright © Miracle Finland Oy Kim Hazelwood, Sarah Bird, David Brooks, Soumith Chintala, Utku Diril, Dmytro Dzhulgakov, Mohamed Fawzy, Bill Jia, Yangqing Jia, Aditya Kalro, James Law, Kevin Lee, Jason Lu, Pieter Noordhuis, Misha Smelyanskiy, Liang Xiong, Xiaodong Wang, “Applied Machine Learning at Facebook: A Datacenter Infrastructure Perspective”, Facebook, Inc. X. He, J. Pan, O. Jun, T. Xu, B. Liu, T. Xu, Y. Shi, A. Atallah, R. Herbrich, S. Bowers, and J. Quinonero Candela, “Practical lessons from predicting clicks on ads at facebook,” in Proceedings of the Eighth International Workshop on Data Mining for Online Advertising, ser. ADKDD’14. New York, NY, USA: ACM, 2014, pp. 5:1–5:9. J. Dunn, “Introducing FBLearner flow: Facebook’s AI backbone,” May 2016, https://fb.me/dunn 2016. https://code.facebook.com/posts/1072626246134461/introducing-fblearner-flow-facebook-s-ai- backbone/ Example Facebook, References
  • 26. Copyright © Miracle Finland Oy * “Give people the power to build community and bring the world closer together.” * Facebook connects more than two billion people as of December 2017 * Could not be done without ML * The massive amount of data required by machine learning services presents challenges to Facebook’s datacenters. * Several techniques are used to efficiently feed data to the models including decoupling of data feed and training, data/compute co-location, and networking optimizations. * Disaster recovery planning is essential * actively evaluating and prototyping new hardware solutions while remaining cognizant of game changing algorithmic innovations Facebook’s mission
  • 27. Copyright © Miracle Finland Oy * News Feed ranking * Ads * Search * Sigma * Lumos * Facer * Language Translation * Speech Recognition Facebook, some use cases for ML, the Products
  • 28. Copyright © Miracle Finland Oy * ML is used for * ranking and personalizing News Feed stories * filtering out offensive content * highlighting trending topics * ranking search results, and much more. * General models are trained to determine various user and environmental factors that should ultimately determine the rank order of content. * The model is used to generate a personalized set of the best posts, images, and other content to display from thousands of candidates, and the best ordering of this chosen content. News Feed
  • 29. Copyright © Miracle Finland Oy * Online advertising allows advertisers to only bid and pay for measurable user responses, such as clicks on ads. * As a consequence, click prediction systems are central to most online advertising systems. * General Ads models are trained to learn how user traits, user context, previous interactions, and advertisement attributes can be most predictive of the likelihood of clicking on an ad, visiting a website, and/or purchasing a product. * Inputs are run through a trained model to immediately determine which ads to display to a particular Facebook user. Ads
  • 30. Copyright © Miracle Finland Oy * The click prediction system needs to be robust and adaptive, and capable of learning from massive volumes of data. * At Facebook they use a model which combines decision trees with logistic regression * Based on their experience: the most important thing is to have the right features (those capturing historical information about the user or ad dominate other types of features) and the right model * Measures: the accuracy of prediction Predicting the Clicks
  • 31. Copyright © Miracle Finland Oy X. He, J. Pan, O. Jun, T. Xu, B. Liu, T. Xu, Y. Shi, A. Atallah, R. Herbrich, S. Bowers, and J. Quinonero Candela, “Practical lessons from predicting clicks on ads at facebook,” in Proceedings of the Eighth International Workshop on Data Mining for Online Advertising, ser. ADKDD’14. New York, NY, USA: ACM, 2014, pp. 5:1–5:9.
  • 32. Copyright © Miracle Finland Oy * Launches a series of distinct and specialized sub-searches to the various verticals, e.g., videos, photos, people, events, etc. * A classifier layer is run atop the various search verticals to predict which of the many verticals to search (searching all possible verticals would be inefficient) * The classifier and these search verticals consist of * an offline stage to train the models * and an online stage to run the models and perform the classification and search Search
  • 33. Copyright © Miracle Finland Oy * General classification and anomaly detection framework that is used for a variety of internal applications (site integrity, spam detection, payments, registration, unauthorized employee access, and event recommendations) * Sigma includes hundreds of distinct models running in production everyday * each model is trained to detect anomalies (e.g. classify content) Sigma
  • 34. Copyright © Miracle Finland Oy * Extract high-level attributes and embeddings from an image and its content * That data can be used as input to other products and services * for example as it were text. Lumos
  • 35. Copyright © Miracle Finland Oy * Facebook’s face detection and recognition framework * Given an image * finds all of the faces in that image * runs a user-specific facial-recognition algorithm to determine the likelihood of that face belonging to one of your top-N friends who have enabled face recognition * This allows Facebook to suggest which of your friends you might want to tag within the photos you upload. Facer
  • 36. Copyright © Miracle Finland Oy * Service that manages internationalization of Facebook content * Supports translations for more than 45 languages (as the source or target language) * supports more than 2000 translation directions * serves 4.5B translated post impressions every day * Each language pair direction has its own model * multi-language models are being considered Language Translation
  • 37. Copyright © Miracle Finland Oy * Converts audio streams into text * Provides automated captioning for video * Most streams are English language * other languages will be available in future * Additionally, non-language audio events are also detected with a similar system (simpler model). Speech Recognition
  • 38. Copyright © Miracle Finland Oy Algorithms Facebook uses for these services
  • 39. Copyright © Miracle Finland Oy How do they do all this at Facebook?
  • 40. Copyright © Miracle Finland Oy FBLearner Platform
  • 41. Copyright © Miracle Finland Oy * The starting point for a ML modeling task is to gather and generate features. * The Feature Store is a catalog of several feature generators * can be used both for training and real-time prediction * serves as a marketplace that multiple teams can use to share and discover features FBLearner Feature Store
  • 42. Copyright © Miracle Finland Oy * Facebook’s machine learning platform for model training * Workflows: A workflow is a single pipeline defined within FBLearner Flow and is the entry point for all machine learning tasks. * Each workflow performs a specific job, such as training and evaluation of a specific model. * Workflows are defined in terms of operators and can be parallelized. * Operators: Operators are the building blocks of workflows * In FBLearner Flow, operators are the smallest unit of execution and run on a single machine. * Channels: Channels represent inputs and outputs, which flow between operators within a workflow. * All channels are typed using a custom type system. * Flow has tooling for experiment management. * The user interface keeps track of all of the artifacts and metrics generated by each workflow execution or experiment. * The user interface makes it simple to compare and manage these experiments. FBLearner Flow
  • 43. Copyright © Miracle Finland Oy * The platform consists of three core components: * an authorship and execution environment for custom distributed workflows * an experimentation management UI for launching experiments and viewing results * numerous predefined pipelines for training the most commonly used machine learning algorithms at Facebook. FBLearner Flow
  • 44. Copyright © Miracle Finland Oy * Facebook’s internal inference engine that uses the models trained in FBLearner Flow to provide predictions in real time. * Can be used * as a multitenancy service * or as a library that can be integrated in product specific backend services * Is used by multiple product teams at Facebook, many of which require low latency solutions. * The direct integration between Flow and Predictor also helps with * running online experiments * managing multiple versions of models in productions FBLearner Predictor
  • 45. Copyright © Miracle Finland Oy * Two distinct but synergistic frameworks for deep learning at Facebook: * PyTorch, which is optimized for research * Caffe2, which is optimized for production Frameworks for deep learning
  • 46. Copyright © Miracle Finland Oy * PyTorch is the framework for AI research at Facebook which enables rapid experimentation * Flexibility * Debugging * Dynamic neural networks * Not optimized for production and mobile deployments (Python) * When research projects produce valuable results, the models need to be transferred to production. * Traditionally, rewriting the training pipeline in a product environment with other frameworks. PyTorch
  • 47. Copyright © Miracle Finland Oy * Facebook’s in-house production framework * For training and deploying large-scale machine learning models * Focuses on several key features required by products: * Performance * cross-platform support * coverage for fundamental machine learning algorithms (convolutional neural networks (CNNs), recurrent networks (RNNs), and multi-layer perceptrons (MLPs)) and up to tens of billions of parameters Caffe2
  • 48. Copyright © Miracle Finland Oy * Different tools are better for different subset of problems and have varying tradeoffs on flexibility, performance, and supported platforms . As a result, there should be a way to exchange trained models between different frameworks or platforms. * ONNX is a format to represent deep learning models in a standard way to enable interoperability across different frameworks and vendor-optimized libraries. * ONNX is designed as an open specification * Within Facebook, ONNX is used for transferring research models from the PyTorch environment to high-performance production environment in Caffe2. * ONNX provides the ability to automatically capture and translate static parts of the models. * An additional toolchain facilitates transfer of dynamic graph parts from Python by either mapping them to control-flow primitives in Caffe2 or reimplementing them in C++ as custom operators. Open Neural Network Exchange, ONNX
  • 49. Copyright © Miracle Finland Oy Caffe2 and PyTorch join forces to create a Research + Production platform PyTorch 1.0: https://caffe2.ai/blog/2018/05/02/Caffe2_PyTorch_1_0.html “We realized that in order to deliver the best user experience, it makes sense to combine the beneficial traits of Caffe2 and PyTorch into a single package and enable a smooth transition from fast prototyping to fast execution. It’d also improve our developer efficiency by more easily utilizing a shared set of tools.” Caffe2 and PyTorch projects are merging
  • 50. Copyright © Miracle Finland Oy * success is predicated on the availability of extensive, high-quality data * complex preprocessing logic is applied to ensure that data is cleaned and normalized to allow efficient transfer and easy learning * The ability to rapidly process and feed these data to the training machines is important for ensuring that we have fast and efficient offline training. * These impose very high resource requirement especially on storage, network, and CPU. * actively evaluating and prototyping new hardware solutions while remaining cognizant of game changing algorithmic innovations The success factors 1/2
  • 51. Copyright © Miracle Finland Oy * https://research.fb.com/category/machine-learning/ Facebook, research
  • 52. Copyright © Miracle Finland Oy * Knowing what to measure to know what to improve The success factors 2/2
  • 53. Copyright © Miracle Finland Oy * Number of positives, number of negatives, number of true positives, number of false positives, number of true negatives, number of false negatives * Portion of positives, portion of negatives * Class ratio * Accuracy, Error rate * ROC curve, coverage curve, * … * It all depends on how we define the performance for the answer to our question (experiment): experimental objective What to measure?
  • 54. Copyright © Miracle Finland Oy * “we noticed that the largest improvements in accuracy often came from quick experiments, feature engineering, and model tuning rather than applying fundamentally different algorithms” * An engineer may need to attempt hundreds of experiments before finding a successful new feature or set of hyperparameters. Facebook
  • 55. Copyright © Miracle Finland Oy * AI and machine learning is here and it’s the future * So many interesting areas to learn * Pick your area and START LEARNING! The future and now!
  • 56. Copyright © Miracle Finland Oy * Python * R * C/C++ * Java * JavaScript * Julia, Scala, Ruby, Octave, MATLAB, SAS * … * https://medium.com/towards-data-science/what-is-the-best-programming-language-for- machine-learning-a745c156d6b7 So many more languages to learn…
  • 57. Copyright © Miracle Finland Oy * Reinforcement learning * the machine or software agent learns based on feedback from the environment * Preference learning * inducing predictive preference models from empirical data * Multi-task learning * multiple learning tasks are solved at the same time, while exploiting commonalities and differences across tasks * Online machine learning * data becomes available in a sequential order and is used to update our best predictor for future data at each step And there’s so much more in Machine Learning too!
  • 58. Copyright © Miracle Finland Oy * Active learning * A learning algorithm is able to interactively query the user (or some other information source) to obtain the desired outputs at new data points * Deep learning * Images and anything that is in ”several layers” * Adaptive Intelligence * People and machines
  • 59. Copyright © Miracle Finland Oy * ML can be used ”everywhere”: * Spam filters * Log filters (and alarms) * Data analytics * Image recognition * Speech recognition * Medical diagnosis * Robotics * Chatbots * … Conclusion
  • 60. Copyright © Miracle Finland Oy * Facebook uses ML ”everywhere” * News Feed ranking * Ads * Search * Sigma * Lumos * Facer * Language Translation * Speech Recognition Conclusion
  • 61. Copyright © Miracle Finland Oy * You can use ML ”everywhere” * Start small and when you learn more do more * Define a Task and let ML solve it * Machines are not taking our jobs but helping us to do more interesting things * With ML we can understand our data better and make better decisions Conclusion
  • 62. THANK YOU! QUESTIONS? Email: heli@miracleoy.fi Twitter: @HeliFromFinland Blog: Helifromfinland.com