Machine Learning (10.17.2018)
Machine Learning (10.17.2018)
LEARNING
Dr. Supeno Mardi Susiki Nugroho, ST., MT.
Kelas Logistik dan Jadwal
• 36 Pertemuan
• Software yang digunakan
– Python 3
– TensorFlow (TF) + Keras
• Final Project + Presentasi
Daftar isi
• Cara Manusia Belajar
• Machine Learning
• Lingkaran Sense, Think, Act: Sistem Robotic
• Supervised learning
• Unsupervised learning
• Pilihan algorithma Machine Learning
• Agen Pintar
• Dunia Robot
CARA MANUSIA BELAJAR
Bayi belajar dengan cara apa?
• Dari lahir sampai 6 bulan
– Able to recognize the faces of their parents
– Able to discern discrete objects from backgrounds
– Able to tell apart voices
• Dalam setahun
– Developed an intuition for natural physics
– Track objects, even there were occlusion
– Associate sounds with specific meaning
• Batita
– Sophisticated understanding of grammar
– Thousands of words in their vocabularies
CARA MANUSIA BELAJAR
• Think
– Poll each decision tree Act
• Act
– Execute any changes to
actions
Arsitektur Sistem Robotic
• Data acquisition
Think • Locomotion
• Filtering • Navigation • Kinematics
• Perception • Localization • Motor control
• Decision making
Sense
Act
Intelligent machines
• We have dreamed of building intelligent machines with brain like ours
– Domestic service robots = enable to clean home
– Unmanned vehicles = can drive by themselves
Keterbatasan traditional computer programs
𝒙 = x1 x2 T , 𝜃 = 𝜃0 𝜃1 𝜃2 𝑇
𝜃1
−1 𝑖𝑓 𝒙𝑇 ∙ + 𝜃0 < 0
𝜃2
ℎ(𝒙, 𝜃) =
𝜃
1 𝑖𝑓 𝒙𝑇 ∙ 1 + 𝜃0 ≥ 0
𝜃2
−1 𝑖𝑓 3𝑥1 + 4𝑥2 − 24 < 0
ℎ(𝒙, 𝜃) = ቊ
1 𝑖𝑓 3𝑥1 + 4𝑥2 − 24 ≥ 0
Contoh: non linear problem
• In general, to solve a problem: finding an “optimal” parameters
– This job is done by an “optimizer” by e.g. minimizing the error
• We need to think another way to solve these!
The neuron
• The foundation unit of the human brain
– In a tiny piece of brain (about the size of grain of rice)
• 10,000 neurons
• Each of which forms an average of 6,000 connections with other neurons
– They communicate each others by sending and receiving signals from the other
Apa itu machine learning?
• Machine learning teaches computers to do what comes
naturally to humans and animals: learn from experience
• Machine learning algorithms use computational methods to
“learn” information directly from data without relying on a
predetermined equation as a model
• The algorithms adaptively improve their performance as the
number of samples available for learning increases
More data, more questions, better answers
• Machine learning algorithms find natural patterns in data that
generate insight and help you make better decisions and
predictions.
• They are used every day to make critical decisions in medical
diagnosis, stock trading, energy load forecasting, and more.
• Media sites rely on machine learning to sift through millions of
options to give you song or movie recommendations.
• Retailers use it to gain insight into their customers’ purchasing
behavior.
Aplikasi dari Machine Learning
• Computational finance, for credit scoring and algorithmic
trading
• Image processing and computer vision, for face recognition,
motion detection, and object detection
• Computational biology, for tumor detection, drug discovery,
and DNA sequencing
• Energy production, for price and load forecasting
• Automotive, aerospace, and manufacturing, for predictive
maintenance
Bagaimana machine learning bekerja
• Machine learning uses two types of techniques:
– Supervised learning, which trains a model on known input and
output data so that it can predict future outputs
– Unsupervised learning, which finds hidden patterns or intrinsic
structures in input data
Supervised learning
• The aim of supervised machine learning is to build a model
that makes predictions based on evidence in the presence of
uncertainty.
– A supervised learning algorithm takes a known set of input data and
known responses to the data (output) and trains a model to generate
reasonable predictions for the response to new data
• Supervised learning uses classification and regression
techniques to develop predictive models
Classification techniques
• Predict discrete responses
– For example, whether an email is genuine or spam, or whether a tumor is cancerous or benign
• Classification models classify input data into categories
• Typical applications include medical imaging, speech recognition, and credit scoring
Regression techniques
• Predict continuous responses
– For example, changes in temperature or fluctuations in power
demand.
• Typical applications include electricity load forecasting and
algorithmic trading
Unsupervised learning
• Finds hidden patterns or intrinsic structures in data
– It is used to draw inferences from datasets consisting of input data
without labeled responses
• Clustering is the most common unsupervised learning
technique
– It is used for exploratory data analysis to find hidden patterns or
groupings in data
• Applications for clustering include gene sequence analysis,
market research, and object recognition
Algoritma Machine Learning
• Choosing the right algorithm can seem overwhelming
– There are dozens of supervised and unsupervised machine learning
algorithms, and each takes a different approach to learning
• There is no best method or one size fits all
– Finding the right algorithm is partly just trial and error
• even highly experienced data scientists can’t tell whether an algorithm will
work without trying it out.
– But algorithm selection also depends on the size and type of data
you’re working with
• The insights you want to get from the data
• How those insights will be used
Pilihan algorithma Machine Learning
KNN
SVM
When should you use machine
learning?
• Consider using machine learning when:
– Have a complex task or problem involving:
e.g.,
Table-Driven-Agent
Add percept to percepts
LUT [percepts, table]
NOP
31
Basic types of agent programs
• Simple reflex agent
• Model-based reflex agent
• Goal-based agent
• Utility-based agent
• Learning agent
32
Simple Reflex Agent
• Input/output associations
• Condition-action rule: “If-then” rule (production rule)
– If condition then action (if in a certain state, do this)
– If antecedent then consequent
33
Simple Reflex Agent
• Simple state-based agent – Classify the current percept into a known state,
then apply the rule for that state
34
Model-Based Reflex Agent
35
Model-Based Reflex Agent
• State-based agent – Given the current state, classify the current percept
into a known state, then apply the rule for that state
36
Goal-Based Agent
37
Utility-Based Agent
38
Learning Agent
39
Daftar isi
• Cara Manusia Belajar
• Machine Learning
• Lingkaran Sense, Think, Act: Sistem Robotic
• Supervised learning
• Unsupervised learning
• Pilihan algorithma Machine Learning
• Agen Pintar
• Dunia Robot
A Robot Platform for every Age and Application
NI LabVIEW
LEGO ® WeDo®
powered by LabVIEW
NI
WorldClass
Types ofRobots
• Fixed-base robots
Challenges
Multiple domains of expertise need to be addressed
Key benefits
Integration of Robot Control and Vision in a single development
environment
Underwater DredgingSystem: Remote Control
Nexans Spider
Application
Level the seabed floor to lay a pipeline from the Orman Lange natural gas field to
the UK. Develop HMI, remote-control interface, heave compensation and power
controls
Challenges
1000 meters below sea level, strong currents,
uneven terrain, constrained time and budget
Key benefits
Rapid development software across multiple computing platforms, rugged
embedded platform
Autonomous Vehicle forDARPA UrbanChallenge
• TORC Technologies and Virginia Tech “Odin” Vehicle
• Application
• Autonomously navigate 60 mile urban environment
• Challenges
• Follow all traffic laws
• Safely navigate around obstacles/barriers Safely interact with other UGV and manned vehicles at stop signs during passing,
parking
• Key benefits
• Rapid development platform
• Domain expertise vs. computer science focus Common tool across Windows, Linux, VxWorks, FPGA
• Fast design iterations
• Infrastructure of support for NI and 3rd party I/O hardware: unrivaled by any text-based language