Learning to Shoot a Goal Lecture 8: Learning Models and Skills

Similar documents
Numerical Methods Lecture 6 - Curve Fitting Techniques

Pattern Recognition Systems Lab 1 Least Mean Squares

Parabolic Path to a Best Best-Fit Line:

The isoperimetric problem on the hypercube

Math Section 2.2 Polynomial Functions

Image Analysis. Segmentation by Fitting a Model

Computational Geometry

EM375 STATISTICS AND MEASUREMENT UNCERTAINTY LEAST SQUARES LINEAR REGRESSION ANALYSIS

Designing a learning system

Designing a learning system

Polynomial Functions and Models. Learning Objectives. Polynomials. P (x) = a n x n + a n 1 x n a 1 x + a 0, a n 0

EVALUATION OF TRIGONOMETRIC FUNCTIONS

Normal Distributions

Bezier curves. Figure 2 shows cubic Bezier curves for various control points. In a Bezier curve, only

n Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis

Our Learning Problem, Again

OCR Statistics 1. Working with data. Section 3: Measures of spread

GRADIENT DESCENT. Admin 10/24/13. Assignment 5. David Kauchak CS 451 Fall 2013

Administrative UNSUPERVISED LEARNING. Unsupervised learning. Supervised learning 11/25/13. Final project. No office hours today

9 x and g(x) = 4. x. Find (x) 3.6. I. Combining Functions. A. From Equations. Example: Let f(x) = and its domain. Example: Let f(x) = and g(x) = x x 4

Creating Exact Bezier Representations of CST Shapes. David D. Marshall. California Polytechnic State University, San Luis Obispo, CA , USA

IMP: Superposer Integrated Morphometrics Package Superposition Tool

SD vs. SD + One of the most important uses of sample statistics is to estimate the corresponding population parameters.

Lecture 18. Optimization in n dimensions

A Note on Least-norm Solution of Global WireWarping

UNIT 4 Section 8 Estimating Population Parameters using Confidence Intervals

Image Segmentation EEE 508

The Closest Line to a Data Set in the Plane. David Gurney Southeastern Louisiana University Hammond, Louisiana

Assignment 5; Due Friday, February 10

15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015

( n+1 2 ) , position=(7+1)/2 =4,(median is observation #4) Median=10lb

Fundamentals of Media Processing. Shin'ichi Satoh Kazuya Kodama Hiroshi Mo Duy-Dinh Le

Overview Chapter 12 A display model

Arithmetic Sequences

Our second algorithm. Comp 135 Machine Learning Computer Science Tufts University. Decision Trees. Decision Trees. Decision Trees.

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs

condition w i B i S maximum u i

Intro to Scientific Computing: Solutions

6.854J / J Advanced Algorithms Fall 2008

Parametric curves. Reading. Parametric polynomial curves. Mathematical curve representation. Brian Curless CSE 457 Spring 2015

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

Data Structures and Algorithms. Analysis of Algorithms

Wavelet Transform. CSE 490 G Introduction to Data Compression Winter Wavelet Transformed Barbara (Enhanced) Wavelet Transformed Barbara (Actual)

Random Graphs and Complex Networks T

Alpha Individual Solutions MAΘ National Convention 2013

Lecture 5. Counting Sort / Radix Sort

Consider the following population data for the state of California. Year Population

Orientation. Orientation 10/28/15

Ones Assignment Method for Solving Traveling Salesman Problem

Lecture 1: Introduction and Strassen s Algorithm

ENGR Spring Exam 1

PLEASURE TEST SERIES (XI) - 04 By O.P. Gupta (For stuffs on Math, click at theopgupta.com)

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)

Improving Template Based Spike Detection

The golden search method: Question 1

3D Model Retrieval Method Based on Sample Prediction

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Mathematics and Art Activity - Basic Plane Tessellation with GeoGebra

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)

ENGR 132. Fall Exam 1

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

2) Give an example of a polynomial function of degree 4 with leading coefficient of -6

How do we evaluate algorithms?

GRADIENT DESCENT. An aside: text classification. Text: raw data. Admin 9/27/16. Assignment 3 graded. Assignment 5. David Kauchak CS 158 Fall 2016

Reading. Parametric curves. Mathematical curve representation. Curves before computers. Required: Angel , , , 11.9.

Diego Nehab. n A Transformation For Extracting New Descriptors of Shape. n Locus of points equidistant from contour

EE123 Digital Signal Processing

CS Polygon Scan Conversion. Slide 1

Elementary Educational Computer

Performance Plus Software Parameter Definitions

. Written in factored form it is easy to see that the roots are 2, 2, i,

Examples and Applications of Binary Search

Homework 1 Solutions MA 522 Fall 2017

MATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fitting)

Algorithms for Disk Covering Problems with the Most Points

CS 111: Program Design I Lecture 15: Modules, Pandas again. Robert H. Sloan & Richard Warner University of Illinois at Chicago March 8, 2018

CS 111: Program Design I Lecture # 7: First Loop, Web Crawler, Functions

ENGR 132. Fall Exam 1 SOLUTIONS

The number n of subintervals times the length h of subintervals gives length of interval (b-a).

Thompson s Group F (p + 1) is not Minimally Almost Convex

Informed Search. Russell and Norvig Chap. 3

Chapter 3 MATHEMATICAL MODELING OF TOLERANCE ALLOCATION AND OVERVIEW OF EVOLUTIONARY ALGORITHMS

CS 111: Program Design I Lecture #26: Heat maps, Nothing, Predictive Policing

Python Programming: An Introduction to Computer Science

15 UNSUPERVISED LEARNING

Civil Engineering Computation

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Analysis of Algorithms

Cluster Analysis. Andrew Kusiak Intelligent Systems Laboratory

CS473-Algorithms I. Lecture 2. Asymptotic Notation. CS 473 Lecture 2 1

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup

ANN WHICH COVERS MLP AND RBF

Mobile terminal 3D image reconstruction program development based on Android Lin Qinhua

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON

Apparent Depth. B' l'

Analysis of Algorithms

Math 3201 Notes Chapter 4: Rational Expressions & Equations

Lecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions

Transcription:

Learig to Shoot a Goal Lecture 8: Learig Models ad Skills How do we acquire skill at shootig goals? CS 344R/393R: Robotics Bejami Kuipers Learig to Shoot a Goal The robot eeds to shoot the ball i the goal. How ca it lear skill from practice? Parameterize the task ad result: x describes the egocetric ball positio y is a parameter of the kick actio z describes where the ball goes Lear a forward model: z = a + bx + cy A forward model predicts the result of a actio. A iverse model predicts the actio that will give the result. Practice, Practice, Practice To lear a predictive model: z = a + bx + cy Collect a lot of data (x i, y i, z i ) Fid a, b, ad c to best fit the data. To decide how to shoot, ivert the model to get: y = (z - a - bx)/c More geerally: Lear result = f(situatio,actio) Ivert to get actio = g(situatio,result) Do t igore the ucertaity. Regressio Regressio fids the best fuctio from a give class, to fit the available data. Liear regressio fids a liear fuctio. Like z = a + bx + cy Other regressios: polyomial, logistic, memory-based, kerel-based, etc. We ca add terms like x, y ad xy ad still use liear regressio to fid a model z = a + bx + dx + cy + ey + fxy Simple example: z = a + bx The residual is the remaiig error. Stochastic equatio: z i = a + bx i + ε i Set a ad b to esure that E[ε] = 0 ad miimize E[ε ]. Not quite idetical to: ε i N(0,σ) with miimal σ.

First, the simple case Suppose we have data poits (x i, z i ) ad we wat to lear a model z = a + bx + ε We eed to fid a ad b to miimize the squared error: E = "(z i # a ) Shift the mea to the origi: (x i " x, z i " z ) First we fid b such that (z i " z ) = b(x i Oce we have b, we will get a = z " bx After shiftig the data to the origi Give the data set (x i " x, z i " z ) look for the best fit b for (z " z ) = b(x that miimizes E = "(z i # z # b(x i # x )) Look for a local miimum of E de db = #"(z i " z " b(x i ) (x i = 0 ( ) = "# (z i " b(x i = 0 It s a miimum because d E db = + # (x " x i ) > 0 #(z i b = #(x i Summary Give data poits (x i, z i ) The best fittig lie z = a + bx is give by #(z i b = #(x i a = z " bx Up to more dimesios Suppose our dataset is (x i, y i, z i ) (For simplicity, assume data cetered at origi) We wat to fit the plae z = bx + cy The error term is E = "(z i ) Fid a miimum "E = $ #x i (z i ) = 0 "b "E Solve for b ad c "c b" x i + c" x i y i = " x i z i b" x i y i + c" y i = " y i z i = $ #y i (z i ) = 0 Cautio! It s easy to liste to this, ad eve read it carefully, ad thik it all makes sese. But you still do t uderstad it! Your dataset (x i, y i, z i ) will ot be cetered aroud the origi. You eed to fit the plae z = a + bx + cy Work through the math for this, by had. Cleaig the data Give the data (x i, y i, z i ) fid the best-fittig plae z = a + bx + cy Compute the residuals: r i = z i a bx i cy i The mea of the r i should be zero. Compute the stadard deviatio σ r A data poit is a outlier if r i > 3σ r Discard the outliers Recompute the regressio, usig oly iliers.

Discardig Outliers Why is it OK to discard outliers if r i > 3σ r? Outliers are still data, are t they? A model explais data by sayig that some causes are relevat, ad others are egligible. If a data poit has p <.00 accordig to the model, it is more likely explaied as a modelig error, tha as a ulikely outcome. A ulikely outcome is t helpful i fittig model parameters, ayway. Represetig a lie x cos θ + y si θ = r (x,y) (cos θ, si θ) = r For fixed (r,θ), represet all poits (x,y) o a give lie. For fixed (x,y), represet all lies (r,θ) through (x,y). Hough Trasform Hough Space: (r,θ) represetatios Each observed poit (x,y) votes for all lies (r,θ) passig through it. Votes From Three Poits Each poit cotributes a curve of votes. Lies Get the Most Votes Votes from three very strog lies. Lies Get the Most Votes Idetify local max i Hough Space to defie a lie i Image Space. 3

Hough Trasform Issues Hough Trasform works with ay parameterized model: circle, rectagle, etc. But i a high-dimesioal Hough Space, each cell gets few votes RANSAC Radom Sample Cosesus A method for robust model-fittig. Separatig iliers from outliers. To maximize votes, use large cells. But they give low resolutio model descriptios. RANSAC to Fid Lie Models Repeat k times: Select poits from data, to defie a model M. Collect all poits from data, withi tolerace t of the model M. These are the iliers. If #iliers < d, give up o model M. Fid the model M that best fits the iliers. I this case, by liear regressio. Record the error of the iliers from model M. Retur the model M with the lowest error. RANSAC Pros ad Cos Very robust search for models. The model classifies data as iliers ad outliers Ca estimate probability of failure as a fuctio of k. But o upper boud. Ca fid multiple models by deletig data explaied by curret best model. But this ca fail if curret best model is bad. Back to Learig a Skill! Remember: x describes the egocetric ball positio y is a parameter of the kick actio z describes where the ball goes Lear a forward model: z = a + bx + cy Practice to collect the data (x i, y i, z i ) Do regressio to fid a, b, ad c To decide how to shoot, ivert the model to get: y = (z - a - bx)/c Learig to Shoot a Goal Ball positio x. Goal positio z. Kick param y 4

Egocetric Ball Positio: x I assume that you ca positio your robot so that the ball positio ca be described by a sigle parameter x. You ca use (x, x ), but more variables requires more data. Whe you re close eough to kick the ball, you ll be too close to be sure where it is! Pick a positio farther away, for accurate x. Kick Actio parameter: y The built-i kicks have o parameters. Your kick actio icludes a step or two to approach the ball, the a built-i kick. Embed the parameter y i the approach. Try various parameterizatios: Sideways compoet of the walk Turig while walkig forward etc. Avoid gaps i the search space of y values. Where the ball goes: z Track the ball after the kick. Keep your eye o the ball! After a suitable period of time ( secod?), record the directio the ball wet. Body-cetered egocetric frame of referece Plaig the shot You have a forward model: z = a + bx + cy Ivert the model: y = (z - a - bx)/c z is where you wat the ball to go x is where you see the ball right ow a, b, c have bee leared Compute y: how to cotrol the kick actio Q: Would it help to have a Bayesia model of the distributio p(z x, y)? Next Kalma filters: trackig dyamic systems. Exteded Kalma filters: hadlig oliearity by local liearizatio. 5