
- Basic algebra linear regression equations how to#
- Basic algebra linear regression equations upgrade#
- Basic algebra linear regression equations code#
Note that although the set of equations is linear with regards to the unknown coefficients, it can be highly non-linear with regards to the input R, G and B values, depending on the value of iTransformType which determines the type of polynome in R, G and B that will be used, e.g. Here is a piece from the Color class that actually solves 3 sets of linear equations at once (one for each R, G and B color component), resulting in a set of equations that can be used to transform color triplets from one color space to another, e.g.
Basic algebra linear regression equations code#
I just hope it is helpful to somebody, maybe as a starting class for more advanced functionality (Please let me now, so I can post enhancements back on the website) Code example I realize that this is by no means a complete BLAS class, I just implemented what I needed. Getting and settings row and columns of matrix using a vector.Matrix, vector-matrix and matrix-vector product.Scalar product of a vector-matrix product.Maximum and minimum of the elements of a vector or a matrix.

Sum and mean of elements of a vector or columns of a matrix.Element-wise addition, subtraction and scaling of vectors and matrices.
Basic algebra linear regression equations how to#
See ImproveRGBTosRGBTransform in the Color class for an example of how to use this function. Can find the parameters that minimizes a user-supplied function.

Some knowledge about linear algebra and numerical computing comes in handy. It was only a small effort to enhance the class with some basic matrix and vector algebra routines, especially with the possibility of overloading in VB.NET.
Basic algebra linear regression equations upgrade#
There are some VB libraries out there for this purpose, but because I had already converted a few Numerical Recipes routines from C to VB4 years ago, and in order to have tight integration with my Color class, I decided to upgrade these old routines to VB.NET.
