Data Fitting and Uncertainty

Similar documents
Introduction to Applied Linear Algebra with MATLAB

Numerical Methods in Matrix Computations

1 Number Systems and Errors 1

Non-linear least squares

GEOPHYSICAL INVERSE THEORY AND REGULARIZATION PROBLEMS

Applied Numerical Analysis

Contents. Preface to the Third Edition (2007) Preface to the Second Edition (1992) Preface to the First Edition (1985) License and Legal Information

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Lessons in Estimation Theory for Signal Processing, Communications, and Control

Conceptual Questions for Review

Inverse Problems and Optimal Design in Electricity and Magnetism

NUMERICAL METHODS USING MATLAB

* Tuesday 17 January :30-16:30 (2 hours) Recored on ESSE3 General introduction to the course.

MATHEMATICAL METHODS INTERPOLATION

PARTIAL DIFFERENTIAL EQUATIONS

Their Statistical Analvsis. With Web-Based Fortran Code. Berg

13. Nonlinear least squares

FINITE-DIMENSIONAL LINEAR ALGEBRA

Lecture 4: Types of errors. Bayesian regression models. Logistic regression

IDL Advanced Math & Stats Module

j=1 r 1 x 1 x n. r m r j (x) r j r j (x) r j (x). r j x k

OPTIMAL ESTIMATION of DYNAMIC SYSTEMS

Numerical Methods for Engineers

CS545 Contents XVI. Adaptive Control. Reading Assignment for Next Class. u Model Reference Adaptive Control. u Self-Tuning Regulators

NUMERICAL METHODS. lor CHEMICAL ENGINEERS. Using Excel', VBA, and MATLAB* VICTOR J. LAW. CRC Press. Taylor & Francis Group

Linear Models 1. Isfahan University of Technology Fall Semester, 2014

Identification of Nonlinear Systems Using Neural Networks and Polynomial Models

Contents. 1 State-Space Linear Systems 5. 2 Linearization Causality, Time Invariance, and Linearity 31

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

PRECALCULUS BISHOP KELLY HIGH SCHOOL BOISE, IDAHO. Prepared by Kristina L. Gazdik. March 2005

Introduction to Numerical Analysis

Preface to Second Edition... vii. Preface to First Edition...

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

Wiley. Methods and Applications of Linear Models. Regression and the Analysis. of Variance. Third Edition. Ishpeming, Michigan RONALD R.

Numerical computation II. Reprojection error Bundle adjustment Family of Newtonʼs methods Statistical background Maximum likelihood estimation

NUMERICAL MATHEMATICS AND COMPUTING

APPLIED NUMERICAL LINEAR ALGEBRA

Hands-on Matrix Algebra Using R

Computational Methods

Fitting. PHY 688: Numerical Methods for (Astro)Physics

Applied Linear Algebra in Geoscience Using MATLAB

MATHEMATICS FOR ECONOMISTS. An Introductory Textbook. Third Edition. Malcolm Pemberton and Nicholas Rau. UNIVERSITY OF TORONTO PRESS Toronto Buffalo

Numerical solution of Least Squares Problems 1/32

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

Contents. I Basic Methods 13

Introduction to Mathematical Physics

Preliminary Examination in Numerical Analysis

SECTION 7: CURVE FITTING. MAE 4020/5020 Numerical Methods with MATLAB

Contents. I Background 1. Contents... Preface... Acknowledgments... The Blind Men and the Elephant... xxi. History of Impedance Spectroscopy...

Stable Adaptive Momentum for Rapid Online Learning in Nonlinear Systems

Analysis and Synthesis of Single-Input Single-Output Control Systems

Linear and Nonlinear Models

Least Squares Fitting of Data by Linear or Quadratic Structures

ADAPTIVE FILTER THEORY

System Identification and Optimization Methods Based on Derivatives. Chapters 5 & 6 from Jang

Pattern Recognition and Machine Learning

NUMERICAL METHODS FOR ENGINEERING APPLICATION

ADVANCED ENGINEERING MATHEMATICS

Engineering Part IIB: Module 4F10 Statistical Pattern Processing Lecture 5: Single Layer Perceptrons & Estimating Linear Classifiers

Data Analysis. with Excel. An introduction for Physical scientists. LesKirkup university of Technology, Sydney CAMBRIDGE UNIVERSITY PRESS

Statistical and Adaptive Signal Processing

MATHEMATICS. Course Syllabus. Section A: Linear Algebra. Subject Code: MA. Course Structure. Ordinary Differential Equations

Practical Statistics for the Analytical Scientist Table of Contents

CS545 Contents XVI. l Adaptive Control. l Reading Assignment for Next Class

Reading Group on Deep Learning Session 1

Numerical Methods with MATLAB

GATE Engineering Mathematics SAMPLE STUDY MATERIAL. Postal Correspondence Course GATE. Engineering. Mathematics GATE ENGINEERING MATHEMATICS

Contents. Preface... xi. Introduction...

Observed Brain Dynamics

Kernel-based Approximation. Methods using MATLAB. Gregory Fasshauer. Interdisciplinary Mathematical Sciences. Michael McCourt.

xvi xxiii xxvi Construction of the Real Line 2 Is Every Real Number Rational? 3 Problems Algebra of the Real Numbers 7

Method 1: Geometric Error Optimization

Numerical Analysis for Statisticians

Development of Stochastic Artificial Neural Networks for Hydrological Prediction

6. MESH ANALYSIS 6.1 INTRODUCTION

A6523 Modeling, Inference, and Mining Jim Cordes, Cornell University

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

Least-Squares Fitting of Model Parameters to Experimental Data

Preface to the Second Edition. Preface to the First Edition

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

Linear Regression In God we trust, all others bring data. William Edwards Deming

Statistical methods and data analysis

Sample questions for Fundamentals of Machine Learning 2018

ELECTROCHEMICAL IMPEDANCE SPECTROSCOPY

DonnishJournals

CS 323: Numerical Analysis and Computing

Computational Methods. Least Squares Approximation/Optimization

Advanced. Engineering Mathematics

UNCERTAINTY ANALYSIS OF TWO-SHAFT GAS TURBINE PARAMETER OF ARTIFICIAL NEURAL NETWORK (ANN) APPROXIMATED FUNCTION USING SEQUENTIAL PERTURBATION METHOD

College Algebra and Trigonometry

Revised: 2/19/09 Unit 1 Pre-Algebra Concepts and Operations Review

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

Algebra Topic Alignment

2. Acoustic Wave Equation

Prentice Hall Mathematics, Algebra Correlated to: Achieve American Diploma Project Algebra II End-of-Course Exam Content Standards

Linear Regression and Its Applications

LECTURE NOTE #NEW 6 PROF. ALAN YUILLE

Integral Section List for OCR Specification

Transcription:

TiloStrutz Data Fitting and Uncertainty A practical introduction to weighted least squares and beyond With 124 figures, 23 tables and 71 test questions and examples VIEWEG+ TEUBNER

IX Contents I Framework of Least-Squares Method 1 1 Introduction to Data-Fitting Problems 3 1.1 What is data fitting? 3 1.2 Notation 5 1.3 Linear vs. nonlinear problems 5 1.4 Example applications of linear data fitting 9 1.4.1 Estimation of a constant value 10 1.4.2 Parameter estimation for a straight line (linear regression). 11 1.4.3 Polynomial function 11 1.4.4 Multiple linear regression 12 1.5 Selected nonlinear data-fitting problems 18 1.5.1 Exponential functions 18 1.5.2 Composite Gaussian bell functions 20 1.5.3 Circle function 20 1.5.4 Neural networks 22 1.6 Test questions 24 2 Estimation of Model Parameters by the Method of Least Squares 25 2.1 What are "Least Squares"? 25 2.2 A general algorithm for minimisation problems 27 2.3 Pitfalls 30 2.4 Simplifications for linear model functions 31 2.5 Curve approximation in case of unknown model function 32 2.6 Example computations 34 2.6.1 Constant value 35 2.6.2 Straight line 35 2.6.3 Polynomial approximation 37 2.6.4 Plane approximation 37 2.6.5 Linear prediction 37 2.6.6 Cosine function 38 2.6.7 Rotation and translation of coordinates 38

X 2.6.8 Exponential model function 40 2.6.9 Composite Gaussian bell functions 41 2.6.10 Circle function 42 2.6.11 Neural networks 43 2.7 Test questions 46 3 Weights and Outliers 47 3.1 What are the weights good for? 47 3.2 Outliers 48 3.3 Estimation of weights 50 3.3.1 Estimation by binning 52 3.3.2 Weights estimation using deviates 53 3.4 Approaches towards outlier detection 55 3.4.1 Standardised residuals 56 3.4.2 Cluster criterion 58 3.5 Application of weighted data fitting and outlier detection 68 3.5.1 Constant value 69 3.5.2 Straight line 71 3.5.3 Plane approximation 76 3.5.4 Coordinates transformation 78 3.5.5 Linear prediction 82 3.5.6 Cosine function 83 3.5.7 Exponential model function 89 3.5.8 Composite Gaussian bell functions 92 3.5.9 Circle 97 3.5.10 Comparison of binning and deviate-based weights estimation 98 3.6 Conclusions 101 3.6.1 Evaluation of weighting 101 3.6.2 Comparison of outlier detectors 101 3.6.3 Usefulness of weights 103 3.7 Test questions 103 4 Uncertainty of Results 105 4.1 Goodness-of-fit, precision and accuracy 105 4.1.1 Consistence of statistical model and data 105 4.1.2 Sample variance 106

XI 4.2 Uncertainty of estimated parameters 108 4.3 Uncertainty of data approximation 109 4.4 Inspection of plots 110 4.5 Example computations 112 4.5.1 Constant value 112 4.5.2 Straight line 114 4.5.3 Cosine function 116 4.5.4 Model mismatch 116 4.6 Test questions 123 II Mathematics, Optimisation Methods, and Add ons 125 5 Matrix Algebra 127 5.1 Basics 127 5.2 Determinants 131 5.3 Numerical solutions for matrix inversion 133 5.3.1 Cofactor-matrix method 133 5.3.2 Inversion via Gauss-Jordan elimination 134 5.3.3 Inversion via LU decomposition 136 5.3.4 Inversion by singular value decomposition (SVD) 143 5.4 Test questions 145 6 The Idea behind Least Squares 146 6.1 Normal distribution 146 6.2 Maximum likelihood principle 147 6.3 Fitting of linear model functions 149 6.3.1 Standard approach 149 6.3.2 Solution using singular value decomposition (SVD) 151 6.3.3 Scaling of conditions 152 6.4 Fitting of nonlinear model functions 153 6.4.1 Error-surface approximation 153 6.4.2 Gauss-Newton method 154 6.4.3 Gradient-descent method 157 6.4.4 Levenberg-Marquardt method 158 6.4.5 Example of finding the minimum 158 6.5 Test questions 166

XII 7 Supplemental Tools and Methods 167 7.1 Alternative parameter estimation 167 7.1.1 Recursive adaptation of parameters 167 7.1.2 Iterative gradient descent 168 7.1.3 Evolutionary approach 168 7.2 Chauvenet's criterion for outlier detection 169 7.3 Propagation of errors 172 7.4 Manual calculation of linear least squares 175 7.5 Combined treatment of different model functions 178 7.5.1 Example 1: Coordinate transformation 180 7.5.2 Example 2: Circular movement 182 7.6 Total least squares 184 7.6.1 Orthogonal fitting of a circle 185 7.6.2 General approach 187 7.7 Test questions 190 A Comparison of Approaches to Outlier Detection 191 A.I Normally distributed data 191 A.1.1 Data sets without outliers 191 A.1.2 Data sets containing outliers 193 A.2 Non-Gaussian distribution 196 A.2.1 Laplace distribution 196 A.2.2 Uniformly distributed data 196 A.3 Discussion 199 B Implementation 202 B.I Functionality 202 B.2 Manual 202 B.2.1 Input and output 204 B.2.2 Initialisation of model parameters 210 B.2.3 Processing control 213 B.2.4 Weights and outliers 213 B.3 General organisation of source code 219 B.4 Model functions 221 B.4.1 Numerical differentiation 221 B.4.2 Handling of multi-dimensional conditions 222

XIII B.4.3 Limitation of parameter space 223 B.4.4 Initialisation of parameters 223 B.5 Special algorithms 224 B.5.1 LU decomposition 224 B.5.2 Singular value decomposition 225 B.5.3 Sorting 225 B.6 Possible optimisations 225 B.7 Performance Test 226 B.7.1 Fitting linear systems 227 B.7.2 Fitting nonlinear systems 230 List of symbols 235 Bibliography 237 Index 241 S The Source Code (accessible via internet) 1 5.1 Licence and Disclaimer 1 5.2 Main functions 2 5.3 Model functions 23 5.4 Initialisation of nonlinear models 31 5.5 Matrix processing 38 5.5.1 Utils 38 5.5.2 Allocation and matrix handling 41 5.6 Command-line parsing 46 5.7 Error Handling 49 5.8 Other 49