KrisLibrary  1.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
Statistics::LinearModel Class Reference

A linear model of n-dimensional data. More...

#include <LinearModel.h>

Public Types

enum  SolveMethod { Cholesky, SVD, QR }
 

Public Member Functions

Real Evaluate (const Vector &x) const
 
Real Variance (const Vector &x) const
 
void CoeffVariance (Vector &coeffVariance) const
 
bool LeastSquares (const Matrix &x, const Vector &outcome)
 
bool LeastSquares (const std::vector< Vector > &x, const std::vector< Real > &outcome)
 
bool LeastSquares (const std::vector< Vector > &x, int outcomeIndex)
 

Public Attributes

SolveMethod solveMethod
 
bool constantOffset
 
Vector coeffs
 
Matrix covariance
 

Detailed Description

A linear model of n-dimensional data.

If constantOffset = true, there are n+1 coefficients, and the n+1'th element of coeffs is a constant offset. That is, the model is x^T coeffs(0:n-1) + coeffs(n). Otherwise, the model is x^T coeffs.

LeastSquares assumes normally distributed data with independent errors.


The documentation for this class was generated from the following files: