Numerical Methods Lecture 6 - Curve Fitting Techniques
|
|
- Douglas Barber
- 6 years ago
- Views:
Transcription
1 Numerical Methods Lecture 6 - Curve Fittig Techiques Topics motivatio iterpolatio liear regressio higher order polyomial form expoetial form Curve fittig - motivatio For root fidig, we used a give fuctio to idetify where it crossed zero where does f( x) 0?? Q: Where does this give fuctio f( x) come from i the first place? Aalytical models of pheomea (e.g. equatios from physics) Create a equatio from observed data 1) Iterpolatio (coect the data-dots) If data is reliable, we ca plot it ad coect the dots This is piece-wise, liear iterpolatio This has limited use as a geeral fuctio f( x) Sice its really a group of small f( x) s, coectig oe poit to the ext ad, it does t work very well for data that has built i radom error (scatter) ) Curve fittig - capturig the tred i the data by assigig a sigle fuctio across the etire rage. The example below uses a straight lie fuctio Iterpolatio f(x) ax + b for each lie Curve Fittig f(x) ax + b for etire rage A straight lie is described geerically by f(x) ax + b The goal is to idetify the coefficiets a ad b such that f(x) fits the data Numerical Methods Lecture 6 - Curve Fittig Techiques page 106 of 118
2 other examples of data sets that we ca fit a fuctio to. height of dropped obect Oxyge i soil pore pressure time Profit temperature soil depth paid labor hours Is a straight lie suitable for each of these cases? No. But we re ot stuck with ust straight lie fits. That is ust where we ll start. Liear curve fittig (liear regressio) Give the geeral form of a straight lie f( x) ax + b How ca we pick the coefficiets that best fits the lie to the data? First questio: What makes a particular straight lie a good fit? Why does the blue lie appear to us to fit the tred better? Cosider the distace betwee the data ad poits o the lie Add up the legth of all the red ad blue verticle lies This is a expressio of the error betwee data ad fitted lie The oe lie that provides a miimum error is the the best straight lie Numerical Methods Lecture 6 - Curve Fittig Techiques page 107 of 118
3 Quatifyig error i a curve fit assumptios: 1) positive or egative error have the same value (data poit is above or below the lie) ) Weight greater errors more heavily we ca do both of these thigs by squarig the distace deote data values as (x, y) >> deote poits o the fitted lie as (x, f(x)) sum the error at the four data poits (x,y ) (x 4,y 4 ) (x,f(x )) (x 4,f(x 4 )) err ( d i ) ( y 1 fx ( 1 )) + ( y fx ( )) + ( y 3 fx ( 3 )) + ( y 4 fx ( 4 )) Our fit is a straight lie, so ow substitute f( x) ax + b # data poits err ( y i fx ( i )) # data poits ( y i ( ax i + b) ) i 1 i 1 The best lie has miimum error betwee lie ad data poits This is called the least squares approach, sice we miimize the square of the error. # data poits miimize err ( y i ( ax i + b) ) i 1 time to pull out the calculus... fidig the miimum of a fuctio 1) derivative describes the slope ) slope zero is a miimum > take the derivative of the error with respect to a ad b, set each to zero err x a i ( y i ax i b) 0 i 1 err y b ( i ax i b) 0 i 1 Numerical Methods Lecture 6 - Curve Fittig Techiques page 108 of 118
4 Solve for the a ad b so that the previous two equatios both 0 re-write these two equatios ax i + bx i ( x i y i ax i y i put these ito matrix form x i x i x i b a y i ( x i y ) i what s ukow? we have the data poits ( x i, y i ) for i 1,...,, so we have all the summatio terms i the matrix so ukows are a ad b Good ews, we already kow how to solve this problem remember Gaussia elimiatio?? A so AX x i, X b, B x i x a i B usig built i MATLAB matrix iversio, the coefficiets a ad b are solved >> X iv(a)*b Note: A, B, ad X are ot the same as a, b, ad x Let s test this with a example: y i ( x i y ) i i x y First we fid values for all the summatio terms 6 x i 7.5, y i.5, x i 13.75, x i y i 41.5 Numerical Methods Lecture 6 - Curve Fittig Techiques page 109 of 118
5 Now pluggig ito the matrix form gives us: b a.5 Note: we are usig x i, NOT ( x i ) 41.5 b a iv * or use Gaussia elimiatio... The solutio is b 0 > f( x) 3x + 0 a 3 This fits the data exactly. That is, the error is zero. Usually this is ot the outcome. Usually we have data that does ot exactly fit a straight lie. Here s a example with some oisy data x [ ], y [ ] b a , b iv * , b a a so our fit is f( x) x Here s a plot of the data ad the curve fit: So...what do we do whe a straight lie is ot suitable for the data set? Profit paid labor hours Straight lie will ot predict dimiishig returs that data shows Numerical Methods Lecture 6 - Curve Fittig Techiques page 110 of 118
6 Curve fittig - higher order polyomials We started the liear curve fit by choosig a geeric form of the straight lie f(x) ax + b This is ust oe kid of fuctio. There are a ifiite umber of geeric forms we could choose from for almost ay shape we wat. Let s start with a simple extesio to the liear regressio cocept recall the examples of sampled data height of dropped obect Oxyge i soil pore pressure time Profit temperature soil depth paid labor hours Is a straight lie suitable for each of these cases? Top left ad bottom right do t look liear i tred, so why fit a straight lie? No reaso to, let s cosider other optios. There are lots of fuctios with lots of differet shapes that deped o coefficiets. We ca choose a form based o experiece ad trial/error. Let s develop a few optios for o-liear curve fittig. We ll start with a simple extesio to liear regressio...higher order polyomials Polyomial Curve Fittig Cosider the geeral form for a polyomial of order f( x) + x+ a x + a 3 x a x + a k x k Just as was the case for liear regressio, we ask: k 1 (1) How ca we pick the coefficiets that best fits the curve to the data? We ca use the same idea: The curve that gives miimum error betwee data y ad the fit f( x) is best Quatify the error for these two secod order curves... Add up the legth of all the red ad blue verticle lies pick curve with miimum total error Numerical Methods Lecture 6 - Curve Fittig Techiques page 111 of 118
7 Error - Least squares approach The geeral expressio for ay error usig the least squares approach is err ( d i ) ( y 1 fx ( 1 )) + ( y fx ( )) + ( y 3 fx ( 3 )) + ( y 4 fx ( 4 )) where we wat to miimize this error. Now substitute the form of our eq. (1) f( x) + x+ a x + a 3 x a x + a k x k k 1 ito the geeral least squares error eq. () err 3 y i + x i + a x i + a 3 x i a x i i 1 where: - # of data poits give, i - the curret data poit beig summed, - the polyomial order re-writig eq. (3) err y i a k x k + i 1 k 1 fid the best lie miimize the error (squared distace) betwee lie ad data poits Fid the set of coefficiets a k, so we ca miimize eq. (4) () (3) (4) CALCULUS TIME To miimize eq. (4), take the derivative with respect to each coefficiet, a k k 1,..., zero err y a i a k x k i 1 k 1 err y a i a k x k + x 0 1 i 1 k 1 err y a i a k x k + x 0 i 1 k 1 : : err y a i a k x k + x 0 i 1 k 1 set each to Numerical Methods Lecture 6 - Curve Fittig Techiques page 11 of 118
8 re-write these + 1 equatios, ad put ito matrix form x i x i... x i x i 3 x i x i x i +... x i : : : : 3 4 x i x i x i x i x i x i... x i a : a y i ( x i y ) i x i yi : x i yi where all summatios above are over i 1...,, what s ukow? we have the data poits ( x i, y i ) for i 1,..., we wat, a k k 1...,, We already kow how to solve this problem. Remember Gaussia elimiatio?? A x i x i... x i x i x i x i... x i 3 4 +, X a, B x i x i x i... x i : : : : : a x i x i x i... x i where all summatios above are over i 1...,, data poits y i ( x i y ) i x i yi : x i yi Note: No matter what the order, we always get equatios LINEAR with respect to the coefficiets. This meas we ca use the followig solutio method AX B usig built i MATLAB matrix iversio, the coefficiets a ad b are solved >> X iv(a)*b Numerical Methods Lecture 6 - Curve Fittig Techiques page 113 of 118
9 Example #1: Fit a secod order polyomial to the followig data i x y Sice the order is ( ), the matrix form to solve is x i x i 3 x i x i x i 3 4 x i x i x i Now plug i the give data. Before we go o...what aswers do you expect for the coefficiets after lookig at the data? 6 x i 7.5, y i x i 13.75, x i y i x i 8.15 x i yi x i a y i x i y i x i yi a Note: we are usig x i, NOT ( x i ). There s a big differece usig the iversio method a iv * Numerical Methods Lecture 6 - Curve Fittig Techiques page 114 of 118
10 or use Gaussia elimiatio gives us the solutio to the coefficiets a 0 0 > f( x) 0 + 0*x + 1*x 1 This fits the data exactly. That is, f(x) y sice y x^ Example #: ucertai data Now we ll try some oisy data x [ ] y [ ] The resultig system to solve is: a iv * givig: a So our fitted secod order fuctio is: f( x) x* *x Example #3 : data with three differet fits I this example, we re ot sure which order will fit well, so we try three differet polyomial orders Note: Liear regressio, or first order curve fittig is ust the geeral polyomial form we ust saw, where we use 1, d ad 6th order look similar, but 6th has a squiggle to it. We may ot wat that... Numerical Methods Lecture 6 - Curve Fittig Techiques page 115 of 118
11 Overfit / Uderfit - pickig a iappropriate order Overfit - over-doig the requiremet for the fit to match the data tred (order too high) Polyomials become more squiggly as their order icreases. A squiggly appearace comes from iflectios i fuctio Cosideratio #1: 3rd order - 1 iflectio poit 4th order - iflectio poits th order - - iflectio poits overfit Cosideratio #: data poits - liear touches each poit 3 data poits - secod order touches each poit data poits - -1 order polyomial will touch each poit SO: Pickig a order too high will overfit data Geeral rule: pick a polyomial form at least several orders lower tha the umber of data poits. Start with liear ad add order util treds are matched. Uderfit - If the order is too low to capture obvious treds i the data Profit paid labor hours Straight lie will ot predict dimiishig returs that data shows Geeral rule: View data first, the select a order that reflects iflectios, etc. For the example above: 1) Obviously oliear, so order > 1 ) No iflcetio poits observed as obvious, so order < 3 is recommeded > I d use d order for this data Numerical Methods Lecture 6 - Curve Fittig Techiques page 116 of 118
12 Curve fittig - Other oliear fits (expoetial) Q: Will a polyomial of ay order ecessarily fit ay set of data? A: Nope, lots of pheomea do t follow a polyomial form they may be, for example, expoetial Example : Data (x,y) follows expoetial form >> x -:.5:4; %create x axis >> y 1.6*exp(1.3*x); %create y data values\ >> %use built i fuctio to fid poly coefficiets >> P polyfit(x,y,); >> P3 polyfit(x,y,3); >> %use built i fuctio to get fits >> fx polyval(p,x); >> fx3 polyval(p3,x); >> %plot the results >> plot(x,y,'rd',x,fx,'g',x,fx3,'b') >> leged('data','d','3rd') Note that either d or 3rd order fit really describes the data well, but higher order will oly get more squiggly What to do...what to do... (he asks thoughtfully) We created this sample of data usig a expoetial fuctio. Why ot create a geeral form of the expoetial fuctio, ad use the error miimizatio cocept to idetify its coefficiets Geeral expoetial equatio f( x) Ce Ax Cexp( Ax) Agai with the error: solve for the coefficiets C, A such that the error is miimized: miimize err ( y i ( Cexp( Ax) )) i 1 Problem: Whe we take partial derivatives with respect to EAR equatios with respect to C, A err ad set to zero, we get two NONLIN- So what? We ca t use Gaussia Elimiatio or the iverse MATLAB fuctio aymore. Those methods are for LINEAR equatios oly... Now what? Numerical Methods Lecture 6 - Curve Fittig Techiques page 117 of 118
13 Solutio #1: Noliear equatio solvig methods Remember we used Newto Raphso to solve a sigle oliear equatio? (root fidig) We ca use Newto Raphso to solve a system of oliear equatios. Is there aother way? For the expoetial form, yes there is Solutio #: Liearizatio: Let s see if we ca t do some algebra ad chage of variables to re-cast this as a liear problem... Give: pair of data (x,y) Fid: a fuctio to fit data of the geeral expoetial form y Ce Ax 1) Take logarithm of both sides to get rid of the expoetial l( y) l( Ce Ax ) Ax + l( C) ) Itroduce the followig chage of variables: Y l( y), X x, B l( C) Now we have: Y AX + B which is a LINEAR equatio The origial data poits i the x y plae get mapped ito the X Y plae. This is called data liearizatio. The data is trasformed as: ( x, y) ( X, Y) ( x, l( y) ) Now we use the method for solvig a first order liear curve fit for A ad B, where above Y l( y), ad X x Fially, we operate o B l( C) to solve C e B Ad we ow have the coefficiets for y Ce Ax Example: repeat previous example, add expoetial fit >> x-:.5:4; >> y 1.6*exp(1.3*x); >> % hopefully our curve fit will capture >> % C 1.6, ad A 1.3 >> %set up liearized data matrix >> sx11sum(x.^0); >> sx1sum(x.^1); >> sx1sx1; >> sxsum(x.^); >> sxy1sum(log(y).*x.^0); >> sxysum(log(y).*x.^1); >> AM [sx11 sx1; sx1 sx] >> BV [sxy1 ; sxy] >> SOL iv(am)*bv >> BSOL(1); >> ASOL(); >> Cexp(B); >> fxexpc*exp(a*x); >> plot(x,y,'rd',x,fx,'g',x,fx3,'b',x,fxexp, m ) >> leged('data','d','3rd', exp fit ) X X X B A Y XY Numerical Methods Lecture 6 - Curve Fittig Techiques page 118 of 118
The Closest Line to a Data Set in the Plane. David Gurney Southeastern Louisiana University Hammond, Louisiana
The Closest Lie to a Data Set i the Plae David Gurey Southeaster Louisiaa Uiversity Hammod, Louisiaa ABSTRACT This paper looks at three differet measures of distace betwee a lie ad a data set i the plae:
More informationEM375 STATISTICS AND MEASUREMENT UNCERTAINTY LEAST SQUARES LINEAR REGRESSION ANALYSIS
EM375 STATISTICS AND MEASUREMENT UNCERTAINTY LEAST SQUARES LINEAR REGRESSION ANALYSIS I this uit of the course we ivestigate fittig a straight lie to measured (x, y) data pairs. The equatio we wat to fit
More informationAlpha Individual Solutions MAΘ National Convention 2013
Alpha Idividual Solutios MAΘ Natioal Covetio 0 Aswers:. D. A. C 4. D 5. C 6. B 7. A 8. C 9. D 0. B. B. A. D 4. C 5. A 6. C 7. B 8. A 9. A 0. C. E. B. D 4. C 5. A 6. D 7. B 8. C 9. D 0. B TB. 570 TB. 5
More informationPolynomial 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
Polyomial Fuctios ad Models 1 Learig Objectives 1. Idetify polyomial fuctios ad their degree 2. Graph polyomial fuctios usig trasformatios 3. Idetify the real zeros of a polyomial fuctio ad their multiplicity
More informationCivil Engineering Computation
Civil Egieerig Computatio Fidig Roots of No-Liear Equatios March 14, 1945 World War II The R.A.F. first operatioal use of the Grad Slam bomb, Bielefeld, Germay. Cotets 2 Root basics Excel solver Newto-Raphso
More informationModule 8-7: Pascal s Triangle and the Binomial Theorem
Module 8-7: Pascal s Triagle ad the Biomial Theorem Gregory V. Bard April 5, 017 A Note about Notatio Just to recall, all of the followig mea the same thig: ( 7 7C 4 C4 7 7C4 5 4 ad they are (all proouced
More information1.2 Binomial Coefficients and Subsets
1.2. BINOMIAL COEFFICIENTS AND SUBSETS 13 1.2 Biomial Coefficiets ad Subsets 1.2-1 The loop below is part of a program to determie the umber of triagles formed by poits i the plae. for i =1 to for j =
More informationThe isoperimetric problem on the hypercube
The isoperimetric problem o the hypercube Prepared by: Steve Butler November 2, 2005 1 The isoperimetric problem We will cosider the -dimesioal hypercube Q Recall that the hypercube Q is a graph whose
More informationPattern Recognition Systems Lab 1 Least Mean Squares
Patter Recogitio Systems Lab 1 Least Mea Squares 1. Objectives This laboratory work itroduces the OpeCV-based framework used throughout the course. I this assigmet a lie is fitted to a set of poits usig
More informationParabolic Path to a Best Best-Fit Line:
Studet Activity : Fidig the Least Squares Regressio Lie By Explorig the Relatioship betwee Slope ad Residuals Objective: How does oe determie a best best-fit lie for a set of data? Eyeballig it may be
More informationLearning to Shoot a Goal Lecture 8: Learning Models and Skills
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.
More informationConsider the following population data for the state of California. Year Population
Assigmets for Bradie Fall 2016 for Chapter 5 Assigmet sheet for Sectios 5.1, 5.3, 5.5, 5.6, 5.7, 5.8 Read Pages 341-349 Exercises for Sectio 5.1 Lagrage Iterpolatio #1, #4, #7, #13, #14 For #1 use MATLAB
More informationMATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fitting)
MATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fittig) I this chapter, we will eamie some methods of aalysis ad data processig; data obtaied as a result of a give
More informationDesigning a learning system
CS 75 Machie Learig Lecture Desigig a learig system Milos Hauskrecht milos@cs.pitt.edu 539 Seott Square, x-5 people.cs.pitt.edu/~milos/courses/cs75/ Admiistrivia No homework assigmet this week Please try
More informationIntro to Scientific Computing: Solutions
Itro to Scietific Computig: Solutios Dr. David M. Goulet. How may steps does it take to separate 3 objects ito groups of 4? We start with 5 objects ad apply 3 steps of the algorithm to reduce the pile
More informationOnes Assignment Method for Solving Traveling Salesman Problem
Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:
More information9 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
1 3.6 I. Combiig Fuctios A. From Equatios Example: Let f(x) = 9 x ad g(x) = 4 f x. Fid (x) g ad its domai. 4 Example: Let f(x) = ad g(x) = x x 4. Fid (f-g)(x) B. From Graphs: Graphical Additio. Example:
More informationEVALUATION OF TRIGONOMETRIC FUNCTIONS
EVALUATION OF TRIGONOMETRIC FUNCTIONS Whe first exposed to trigoometric fuctios i high school studets are expected to memorize the values of the trigoometric fuctios of sie cosie taget for the special
More informationDesigning a learning system
CS 75 Itro to Machie Learig Lecture Desigig a learig system Milos Hauskrecht milos@pitt.edu 539 Seott Square, -5 people.cs.pitt.edu/~milos/courses/cs75/ Admiistrivia No homework assigmet this week Please
More informationArithmetic Sequences
. Arithmetic Sequeces COMMON CORE Learig Stadards HSF-IF.A. HSF-BF.A.1a HSF-BF.A. HSF-LE.A. Essetial Questio How ca you use a arithmetic sequece to describe a patter? A arithmetic sequece is a ordered
More informationCIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)
CIS 11 Data Structures ad Algorithms with Java Fall 017 Big-Oh Notatio Tuesday, September 5 (Make-up Friday, September 8) Learig Goals Review Big-Oh ad lear big/small omega/theta otatios Practice solvig
More informationCSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)
CSC165H1, Witer 018 Learig Objectives By the ed of this worksheet, you will: Aalyse the ruig time of fuctios cotaiig ested loops. 1. Nested loop variatios. Each of the followig fuctios takes as iput a
More informationBezier curves. Figure 2 shows cubic Bezier curves for various control points. In a Bezier curve, only
Edited: Yeh-Liag Hsu (998--; recommeded: Yeh-Liag Hsu (--9; last updated: Yeh-Liag Hsu (9--7. Note: This is the course material for ME55 Geometric modelig ad computer graphics, Yua Ze Uiversity. art of
More informationMath Section 2.2 Polynomial Functions
Math 1330 - Sectio. Polyomial Fuctios Our objectives i workig with polyomial fuctios will be, first, to gather iformatio about the graph of the fuctio ad, secod, to use that iformatio to geerate a reasoably
More information. Written in factored form it is easy to see that the roots are 2, 2, i,
CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or
More informationLecture 18. Optimization in n dimensions
Lecture 8 Optimizatio i dimesios Itroductio We ow cosider the problem of miimizig a sigle scalar fuctio of variables, f x, where x=[ x, x,, x ]T. The D case ca be visualized as fidig the lowest poit of
More informationLU Decomposition Method
SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS LU Decompositio Method Jamie Traha, Autar Kaw, Kevi Marti Uiversity of South Florida Uited States of America kaw@eg.usf.edu http://umericalmethods.eg.usf.edu Itroductio
More informationOCR Statistics 1. Working with data. Section 3: Measures of spread
Notes ad Eamples OCR Statistics 1 Workig with data Sectio 3: Measures of spread Just as there are several differet measures of cetral tedec (averages), there are a variet of statistical measures of spread.
More informationPseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured
More informationNTH, GEOMETRIC, AND TELESCOPING TEST
NTH, GEOMETRIC, AND TELESCOPING TEST Sectio 9. Calculus BC AP/Dual, Revised 08 viet.dag@humbleisd.et /4/08 0:0 PM 9.: th, Geometric, ad Telescopig Test SUMMARY OF TESTS FOR SERIES Lookig at the first few
More information15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015
15-859E: Advaced Algorithms CMU, Sprig 2015 Lecture #2: Radomized MST ad MST Verificatio Jauary 14, 2015 Lecturer: Aupam Gupta Scribe: Yu Zhao 1 Prelimiaries I this lecture we are talkig about two cotets:
More informationThe Graphs of Polynomial Functions
Sectio 4.3 The Graphs of Polyomial Fuctios Objective 1: Uderstadig the Defiitio of a Polyomial Fuctio Defiitio Polyomial Fuctio 1 2 The fuctio ax a 1x a 2x a1x a0 is a polyomial fuctio of degree where
More informationBig-O Analysis. Asymptotics
Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses
More informationIMP: Superposer Integrated Morphometrics Package Superposition Tool
IMP: Superposer Itegrated Morphometrics Package Superpositio Tool Programmig by: David Lieber ( 03) Caisius College 200 Mai St. Buffalo, NY 4208 Cocept by: H. David Sheets, Dept. of Physics, Caisius College
More information27 Refraction, Dispersion, Internal Reflection
Chapter 7 Refractio, Dispersio, Iteral Reflectio 7 Refractio, Dispersio, Iteral Reflectio Whe we talked about thi film iterferece, we said that whe light ecouters a smooth iterface betwee two trasparet
More informationn Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis
Overview Chapter 6 Writig a Program Bjare Stroustrup Some thoughts o software developmet The idea of a calculator Usig a grammar Expressio evaluatio Program orgaizatio www.stroustrup.com/programmig 3 Buildig
More informationMath 3201 Notes Chapter 4: Rational Expressions & Equations
Learig Goals: See p. tet.. Equivalet Ratioal Epressios ( classes) Read Goal p. 6 tet. Math 0 Notes Chapter : Ratioal Epressios & Equatios. Defie ad give a eample of a ratioal epressio. p. 6. Defie o-permissible
More informationSection 7.2: Direction Fields and Euler s Methods
Sectio 7.: Directio ields ad Euler s Methods Practice HW from Stewart Tetbook ot to had i p. 5 # -3 9-3 odd or a give differetial equatio we wat to look at was to fid its solutio. I this chapter we will
More informationCounting Regions in the Plane and More 1
Coutig Regios i the Plae ad More 1 by Zvezdelia Stakova Berkeley Math Circle Itermediate I Group September 016 1. Overarchig Problem Problem 1 Regios i a Circle. The vertices of a polygos are arraged o
More informationLecture 1: Introduction and Strassen s Algorithm
5-750: Graduate Algorithms Jauary 7, 08 Lecture : Itroductio ad Strasse s Algorithm Lecturer: Gary Miller Scribe: Robert Parker Itroductio Machie models I this class, we will primarily use the Radom Access
More information1. The lines intersect. There is one solution, the point where they intersect. The system is called a consistent system.
Commo Core Math 3 Notes Uit Day Systems I. Systems of Liear Equatios A system of two liear equatios i two variables is two equatios cosidered together. To solve a system is to fid all the ordered pairs
More informationcondition w i B i S maximum u i
ecture 10 Dyamic Programmig 10.1 Kapsack Problem November 1, 2004 ecturer: Kamal Jai Notes: Tobias Holgers We are give a set of items U = {a 1, a 2,..., a }. Each item has a weight w i Z + ad a utility
More informationPLEASURE TEST SERIES (XI) - 04 By O.P. Gupta (For stuffs on Math, click at theopgupta.com)
wwwtheopguptacom wwwimathematiciacom For all the Math-Gya Buy books by OP Gupta A Compilatio By : OP Gupta (WhatsApp @ +9-9650 350 0) For more stuffs o Maths, please visit : wwwtheopguptacom Time Allowed
More informationComputational Geometry
Computatioal Geometry Chapter 4 Liear programmig Duality Smallest eclosig disk O the Ageda Liear Programmig Slides courtesy of Craig Gotsma 4. 4. Liear Programmig - Example Defie: (amout amout cosumed
More informationMath 10C Long Range Plans
Math 10C Log Rage Plas Uits: Evaluatio: Homework, projects ad assigmets 10% Uit Tests. 70% Fial Examiatio.. 20% Ay Uit Test may be rewritte for a higher mark. If the retest mark is higher, that mark will
More informationLecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming
Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis
More informationCMPT 125 Assignment 2 Solutions
CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address
More informationGraphs. Minimum Spanning Trees. Slides by Rose Hoberman (CMU)
Graphs Miimum Spaig Trees Slides by Rose Hoberma (CMU) Problem: Layig Telephoe Wire Cetral office 2 Wirig: Naïve Approach Cetral office Expesive! 3 Wirig: Better Approach Cetral office Miimize the total
More informationCHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs
CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics
More information9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence
_9.qxd // : AM Page Chapter 9 Sequeces, Series, ad Probability 9. Sequeces ad Series What you should lear Use sequece otatio to write the terms of sequeces. Use factorial otatio. Use summatio otatio to
More informationLinearising Calibration Methods for a Generic Embedded Sensor Interface (GESI)
1st Iteratioal Coferece o Sesig Techology November 21-23, 2005 Palmersto North, New Zealad Liearisig Calibratio Methods for a Geeric Embedded Sesor Iterface (GESI) Abstract Amra Pašić Work doe i: PEI Techologies,
More informationA Resource for Free-standing Mathematics Qualifications
Ope.ls The first sheet is show elow. It is set up to show graphs with equatios of the form = m + c At preset the values of m ad c are oth zero. You ca chage these values usig the scroll ars. Leave the
More informationLecture 5. Counting Sort / Radix Sort
Lecture 5. Coutig Sort / Radix Sort T. H. Corme, C. E. Leiserso ad R. L. Rivest Itroductio to Algorithms, 3rd Editio, MIT Press, 2009 Sugkyukwa Uiversity Hyuseug Choo choo@skku.edu Copyright 2000-2018
More informationExamples and Applications of Binary Search
Toy Gog ITEE Uiersity of Queeslad I the secod lecture last week we studied the biary search algorithm that soles the problem of determiig if a particular alue appears i a sorted list of iteger or ot. We
More informationArea As A Limit & Sigma Notation
Area As A Limit & Sigma Notatio SUGGESTED REFERENCE MATERIAL: As you work through the problems listed below, you should referece Chapter 5.4 of the recommeded textbook (or the equivalet chapter i your
More informationLecture 7 7 Refraction and Snell s Law Reading Assignment: Read Kipnis Chapter 4 Refraction of Light, Section III, IV
Lecture 7 7 Refractio ad Sell s Law Readig Assigmet: Read Kipis Chapter 4 Refractio of Light, Sectio III, IV 7. History I Eglish-speakig coutries, the law of refractio is kow as Sell s Law, after the Dutch
More information( n+1 2 ) , position=(7+1)/2 =4,(median is observation #4) Median=10lb
Chapter 3 Descriptive Measures Measures of Ceter (Cetral Tedecy) These measures will tell us where is the ceter of our data or where most typical value of a data set lies Mode the value that occurs most
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to
More informationData Structures Week #5. Trees (Ağaçlar)
Data Structures Week #5 Trees Ağaçlar) Trees Ağaçlar) Toros Gökarı Avrupa Gökarı October 28, 2014 Boraha Tümer, Ph.D. 2 Trees Ağaçlar) October 28, 2014 Boraha Tümer, Ph.D. 3 Outlie Trees Deiitios Implemetatio
More information2) Give an example of a polynomial function of degree 4 with leading coefficient of -6
Math 165 Read ahead some cocepts from sectios 4.1 Read the book or the power poit presetatios for this sectio to complete pages 1 ad 2 Please, do ot complete the other pages of the hadout If you wat to
More informationENGR Spring Exam 1
ENGR 300 Sprig 03 Exam INSTRUCTIONS: Duratio: 60 miutes Keep your eyes o your ow work! Keep your work covered at all times!. Each studet is resposible for followig directios. Read carefully.. MATLAB ad
More informationCSC 220: Computer Organization Unit 11 Basic Computer Organization and Design
College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:
More informationBig-O Analysis. Asymptotics
Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses
More informationHow do we evaluate algorithms?
F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:
More information1 Graph Sparsfication
CME 305: Discrete Mathematics ad Algorithms 1 Graph Sparsficatio I this sectio we discuss the approximatio of a graph G(V, E) by a sparse graph H(V, F ) o the same vertex set. I particular, we cosider
More informationWhich movie we can suggest to Anne?
ECOLE CENTRALE SUPELEC MASTER DSBI DECISION MODELING TUTORIAL COLLABORATIVE FILTERING AS A MODEL OF GROUP DECISION-MAKING You kow that the low-tech way to get recommedatios for products, movies, or etertaiig
More informationFURTHER INTEGRATION TECHNIQUES (TRIG, LOG, EXP FUNCTIONS)
Mathematics Revisio Guides More Trigoometric ad Log Itegrals Page of 7 MK HOME TUITION Mathematics Revisio Guides Level: AS / A Level AQA : C Edexcel: C OCR: C OCR MEI: C FURTHER INTEGRATION TECHNIQUES
More informationn n B. How many subsets of C are there of cardinality n. We are selecting elements for such a
4. [10] Usig a combiatorial argumet, prove that for 1: = 0 = Let A ad B be disjoit sets of cardiality each ad C = A B. How may subsets of C are there of cardiality. We are selectig elemets for such a subset
More information15 UNSUPERVISED LEARNING
15 UNSUPERVISED LEARNING [My father] advised me to sit every few moths i my readig chair for a etire eveig, close my eyes ad try to thik of ew problems to solve. I took his advice very seriously ad have
More informationSouth Slave Divisional Education Council. Math 10C
South Slave Divisioal Educatio Coucil Math 10C Curriculum Package February 2012 12 Strad: Measuremet Geeral Outcome: Develop spatial sese ad proportioal reasoig It is expected that studets will: 1. Solve
More informationOur Learning Problem, Again
Noparametric Desity Estimatio Matthew Stoe CS 520, Sprig 2000 Lecture 6 Our Learig Problem, Agai Use traiig data to estimate ukow probabilities ad probability desity fuctios So far, we have depeded o describig
More informationA Note on Least-norm Solution of Global WireWarping
A Note o Least-orm Solutio of Global WireWarpig Charlie C. L. Wag Departmet of Mechaical ad Automatio Egieerig The Chiese Uiversity of Hog Kog Shati, N.T., Hog Kog E-mail: cwag@mae.cuhk.edu.hk Abstract
More informationThe number n of subintervals times the length h of subintervals gives length of interval (b-a).
Simulator with MadMath Kit: Riema Sums (Teacher s pages) I your kit: 1. GeoGebra file: Ready-to-use projector sized simulator: RiemaSumMM.ggb 2. RiemaSumMM.pdf (this file) ad RiemaSumMMEd.pdf (educator's
More informationCreating Exact Bezier Representations of CST Shapes. David D. Marshall. California Polytechnic State University, San Luis Obispo, CA , USA
Creatig Exact Bezier Represetatios of CST Shapes David D. Marshall Califoria Polytechic State Uiversity, Sa Luis Obispo, CA 93407-035, USA The paper presets a method of expressig CST shapes pioeered by
More informationCONTINUI TY. JEE-Mathematics. Illustration 1 : Solution : Illustration 2 : 1. CONTINUOUS FUNCTIONS :
J-Mathematics. CONTINUOUS FUNCTIONS : CONTINUI TY A fuctio for which a small chage i the idepedet variable causes oly a small chage ad ot a sudde jump i the depedet variable are called cotiuous fuctios.
More information6.854J / J Advanced Algorithms Fall 2008
MIT OpeCourseWare http://ocw.mit.edu 6.854J / 18.415J Advaced Algorithms Fall 2008 For iformatio about citig these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advaced Algorithms
More informationReading. Parametric curves. Mathematical curve representation. Curves before computers. Required: Angel , , , 11.9.
Readig Required: Agel.-.3,.5.,.6-.7,.9. Optioal Parametric curves Bartels, Beatty, ad Barsky. A Itroductio to Splies for use i Computer Graphics ad Geometric Modelig, 987. Fari. Curves ad Surfaces for
More informationCh 9.3 Geometric Sequences and Series Lessons
Ch 9.3 Geometric Sequeces ad Series Lessos SKILLS OBJECTIVES Recogize a geometric sequece. Fid the geeral, th term of a geometric sequece. Evaluate a fiite geometric series. Evaluate a ifiite geometric
More informationImage Analysis. Segmentation by Fitting a Model
Image Aalysis Segmetatio by Fittig a Model Christophoros Nikou cikou@cs.uoi.gr Images take from: D. Forsyth ad J. Poce. Computer Visio: A Moder Approach, Pretice Hall, 2003. Computer Visio course by Svetlaa
More informationParametric curves. Reading. Parametric polynomial curves. Mathematical curve representation. Brian Curless CSE 457 Spring 2015
Readig Required: Agel 0.-0.3, 0.5., 0.6-0.7, 0.9 Parametric curves Bria Curless CSE 457 Sprig 05 Optioal Bartels, Beatty, ad Barsy. A Itroductio to Splies for use i Computer Graphics ad Geometric Modelig,
More informationOrientation. Orientation 10/28/15
Orietatio Orietatio We will defie orietatio to mea a object s istataeous rotatioal cofiguratio Thik of it as the rotatioal equivalet of positio 1 Represetig Positios Cartesia coordiates (x,y,z) are a easy
More informationImproving Template Based Spike Detection
Improvig Template Based Spike Detectio Kirk Smith, Member - IEEE Portlad State Uiversity petra@ee.pdx.edu Abstract Template matchig algorithms like SSE, Covolutio ad Maximum Likelihood are well kow for
More informationAdministrative UNSUPERVISED LEARNING. Unsupervised learning. Supervised learning 11/25/13. Final project. No office hours today
Admiistrative Fial project No office hours today UNSUPERVISED LEARNING David Kauchak CS 451 Fall 2013 Supervised learig Usupervised learig label label 1 label 3 model/ predictor label 4 label 5 Supervised
More informationBOOLEAN MATHEMATICS: GENERAL THEORY
CHAPTER 3 BOOLEAN MATHEMATICS: GENERAL THEORY 3.1 ISOMORPHIC PROPERTIES The ame Boolea Arithmetic was chose because it was discovered that literal Boolea Algebra could have a isomorphic umerical aspect.
More informationIntroduction to Sigma Notation
Itroductio to Siga Notatio Steph de Silva //207 What is siga otatio? is the capital Greek letter for the soud s I this case, it s just shorthad for su Siga otatio is what we use whe we have a series of
More informationPerformance Plus Software Parameter Definitions
Performace Plus+ Software Parameter Defiitios/ Performace Plus Software Parameter Defiitios Chapma Techical Note-TG-5 paramete.doc ev-0-03 Performace Plus+ Software Parameter Defiitios/2 Backgroud ad Defiitios
More informationHomework 1 Solutions MA 522 Fall 2017
Homework 1 Solutios MA 5 Fall 017 1. Cosider the searchig problem: Iput A sequece of umbers A = [a 1,..., a ] ad a value v. Output A idex i such that v = A[i] or the special value NIL if v does ot appear
More informationLecture 28: Data Link Layer
Automatic Repeat Request (ARQ) 2. Go ack N ARQ Although the Stop ad Wait ARQ is very simple, you ca easily show that it has very the low efficiecy. The low efficiecy comes from the fact that the trasmittig
More informationSD vs. SD + One of the most important uses of sample statistics is to estimate the corresponding population parameters.
SD vs. SD + Oe of the most importat uses of sample statistics is to estimate the correspodig populatio parameters. The mea of a represetative sample is a good estimate of the mea of the populatio that
More informationIt just came to me that I 8.2 GRAPHS AND CONVERGENCE
44 Chapter 8 Discrete Mathematics: Fuctios o the Set of Natural Numbers (a) Take several odd, positive itegers for a ad write out eough terms of the 3N sequece to reach a repeatig loop (b) Show that ot
More informationChapter 18: Ray Optics Questions & Problems
Chapter 18: Ray Optics Questios & Problems c -1 2 1 1 1 h s θr= θi 1siθ 1 = 2si θ 2 = θ c = si ( ) + = m = = v s s f h s 1 Example 18.1 At high oo, the su is almost directly above (about 2.0 o from the
More informationSolving Fuzzy Assignment Problem Using Fourier Elimination Method
Global Joural of Pure ad Applied Mathematics. ISSN 0973-768 Volume 3, Number 2 (207), pp. 453-462 Research Idia Publicatios http://www.ripublicatio.com Solvig Fuzzy Assigmet Problem Usig Fourier Elimiatio
More information1.8 What Comes Next? What Comes Later?
35 1.8 What Comes Next? What Comes Later? A Practice Uderstadig Task For each of the followig tables, CC BY Hiroaki Maeda https://flic.kr/p/6r8odk describe how to fid the ext term i the sequece, write
More informationRunning Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments
Ruig Time Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects. The
More informationCOMP 558 lecture 6 Sept. 27, 2010
Radiometry We have discussed how light travels i straight lies through space. We would like to be able to talk about how bright differet light rays are. Imagie a thi cylidrical tube ad cosider the amout
More informationA New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method
A ew Morphological 3D Shape Decompositio: Grayscale Iterframe Iterpolatio Method D.. Vizireau Politehica Uiversity Bucharest, Romaia ae@comm.pub.ro R. M. Udrea Politehica Uiversity Bucharest, Romaia mihea@comm.pub.ro
More informationName Date Hr. ALGEBRA 1-2 SPRING FINAL MULTIPLE CHOICE REVIEW #1
Name Date Hr. ALGEBRA - SPRING FINAL MULTIPLE CHOICE REVIEW #. The high temperatures for Phoeix i October of 009 are listed below. Which measure of ceter will provide the most accurate estimatio of the
More informationFundamentals of Media Processing. Shin'ichi Satoh Kazuya Kodama Hiroshi Mo Duy-Dinh Le
Fudametals of Media Processig Shi'ichi Satoh Kazuya Kodama Hiroshi Mo Duy-Dih Le Today's topics Noparametric Methods Parze Widow k-nearest Neighbor Estimatio Clusterig Techiques k-meas Agglomerative Hierarchical
More informationCS 683: Advanced Design and Analysis of Algorithms
CS 683: Advaced Desig ad Aalysis of Algorithms Lecture 6, February 1, 2008 Lecturer: Joh Hopcroft Scribes: Shaomei Wu, Etha Feldma February 7, 2008 1 Threshold for k CNF Satisfiability I the previous lecture,
More informationTexture Mapping. Jian Huang. This set of slides references the ones used at Ohio State for instruction.
Texture Mappig Jia Huag This set of slides refereces the oes used at Ohio State for istructio. Ca you do this What Dreams May Come Texture Mappig Of course, oe ca model the exact micro-geometry + material
More information