Class 16: LispStat Graphics and Object-Oriented Programming


Review from previous class

LU Factorization,S = LU
This factorization is a basic building block, supporting inverse, determinant and solve operations.

Cholesky, S = LL'
This factorization specializes the LU to p.s.d. matrices, leading to a way of finding the "square root" of a matrix. Its also tied closely to regression.

Spectral, S = E D E'
This orthogonal decomposition leads to principal components and an alternative definition of a matrix square root.

QR decomposition
This is a Gram-Schmidt decomposition of a matrix, and leads to a more stable method for solving ill-conditioned systems of equations, such as those in regression with high collinearity.

Singular value decomposition, SVD
The SVD generalizes the notion of eigenvectors. The SVD leads to a very different way to do regression, known as total least squares (TLS). TLS is one approach to the problem of "errors in variables" in regression.


Status of Projects


Graphics and Objects in LispStat

Lisp script for today's class
Class 17.

LispStat graphics are objects.
The graphics in LispStat are organized/implemented using objects. Objects have a variety of attributes, and perhaps most important are: To make effective use of the graphics in LispStat, you need to appreciate the basics of object-oriented programming. In addition, many of the built-in statistical functions of LispStat, such as regression, are implemented as objects. You'll make better use of these if you understand objects.

Finally, you will find that your own programs become more well organized once your learn how to create your own objects. Also, once you have learned to program in LispStat's OOP style, you'll have an easier time with the more rigid style of OOP found in JAVA and C++.

Objects in LispStat
LispStat uses a simple yet powerful method for objects known as prototyping. This design permits many changes to be made 'on the fly' without having to rebuild an entire program.

Each class of objects is defined by describing the slots, parents, and methods of a canonical object known as the prototype. One can then use this prototype as a "cookie cutter" to make new objects.

The objects made by 'cloning' the prototype are known as instances of the prototype. The instances share the behaviours defined by the methods of the prototype, but each has its own state defined by the data held in its slots.

Examples for today
Today we will


Next time

We will use these methods to consider animated sensitivity analysis of robust estimation and robust regression.