Skip to main content

Posts

Showing posts from May, 2022

Linear Least Squares Methods with R: An Algebraic Approach - Part I

Linear Least-Squares Method with R - Part I Linear Least Squares Methods with R: An Algebraic Approach - Part I Algebraic Approach Principles The least-squares method is one of the most well-known linear optimization methods because of its flexibility. Furthermore, it gives a reasonable approximation of a given function. Among the diverse applications that it can be used for is Regression in statistical learning, Direct Linear Transformation methods in projective geometry, and so on. We will demonstrate the principles of least squares methods and implement examples in R in this article. Consider the above figure of a simple linear system where the x variable is an input variable, A is a measurements matrix, and y is the output variable. That is, the model for the equation is given by (1) y = A x , which in a more explicit notation from (1) can be expressed as (2) [ y 1 y 2 ⋮ y i ] = [ a 1 , 1 a 1 , 2 ⋯ a 1 , i a 2 , 1 a 2 , 2 ⋯ a 2 , i ⋮ ⋮ ⋯ ⋮ a j , 1 a j , 2 ⋯ a j , i ] [...