Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

RazorBack::Orthpoly_ Class Reference

This class implements parameter estimation using orthogonal polynomials. More...

#include <Orthpoly.hh>

List of all members.

Public Types

enum  Weighting_ { EQUAL, RELATIVE, POISSON }

Public Methods

 Orthpoly_ ()
 Init to empty.

int data (const Vecdbl_ &Xm, const Vecdbl_ &Ym, const Vecdbl_ &Wgt)
 data(Xm, Ym, (Wgt|Wtype)): resets the calling object and stores the data points with the weights in it. More...

int data (const Vecdbl_ &Xm, const Vecdbl_ &Ym, Weighting_ Wtype=EQUAL)
double poly_fit (unsigned int Deg)
 poly_fit(Deg): fits orthogonal polynomials up to degree Deg to the data previously supplied via the data(...) method. More...

void make_polycoeff ()
 make_polycoeff(): once the user is satisfied with the orthogonal fit, then this method should be called to calculate the parameters and standard deviations for the non-orthogonal estimation Y = p[0]+p[1]*x+...+p[Degree]*x^Degree.

double good_fit () const
 good_fit(): returns a "goodness-of-fit" value that indicates what percentage of Y is "explained" by the fit.

double f_test () const
 f_test(): returns the F-statistic variable that can be tested later for significance.

const Vecdbl_& param () const
 param(): Returns the non-orthogonal parameter coefficients. More...

const Vecdbl_& sdev () const
 sdev(): Returns the standard deviations of the non-orthogonal parameter coefficients. More...

const Smatdbl_& correl () const
 correl(): Returns the correlation (normed covariance) matrix of the non-orthogonal parameter coefficients. More...

double approx (double X) const
 approx(X): approximate Y(X) with the current polynomial.


Protected Methods

void setup_weight (const Vecdbl_ &Ymeas, Weighting_ Weighting)
void make_orthcoeff (unsigned int Deg)
void back_orthcoeff (unsigned int Deg)
void reset ()
void resize_orth (unsigned int Maxdeg)
void resize_param (unsigned int Maxdeg)
void make_orthpoly (size_t Deg)

Static Protected Methods

int check_dim (const Vecdbl_ &Xm, const Vecdbl_ &Ym, const Vecdbl_ &Wgt)

Private Attributes

Vecdbl_ Xmeas
Vecdbl_ W
Vecdbl_ Ymeas
size_t Nm
size_t Nf
Smatdbl_ Poly
Rmatdbl_ Polyval
Vecdbl_ Orthcoeff
Vecdbl_ Varorth
Vecdbl_ Param
Vecdbl_ Sdev
Vecdbl_ Dres
Vecdbl_ Norm
Smatdbl_ Correl
size_t Degree
size_t Maxdegree
double Sres
bool Makepolycoeff


Detailed Description

This class implements parameter estimation using orthogonal polynomials.

The polynomials (up to a desired degree) will be created on-the-fly. You can experiment with various degrees and once you are satisfied you can request a conversion of the orthogonal coefficients into simple polynomial coefficients.

Definition at line 32 of file Orthpoly.hh.


Member Enumeration Documentation

enum RazorBack::Orthpoly_::Weighting_
 

Enumeration values:
EQUAL  
RELATIVE  
POISSON  

Definition at line 37 of file Orthpoly.hh.


Constructor & Destructor Documentation

RazorBack::Orthpoly_::Orthpoly_ ( ) [inline]
 

Init to empty.

Definition at line 58 of file Orthpoly.hh.


Member Function Documentation

int RazorBack::Orthpoly_::data ( const Vecdbl_ & Xm,
const Vecdbl_ & Ym,
const Vecdbl_ & Wgt )
 

data(Xm, Ym, (Wgt|Wtype)): resets the calling object and stores the data points with the weights in it.

If the weighting type is specified instead as the last parameter, then the weight vector will be calculated appropriately from Ym. Return value: the number of data points. Throws Dimexc_ on dim mismatch.

int RazorBack::Orthpoly_::data ( const Vecdbl_ & Xm,
const Vecdbl_ & Ym,
Weighting_ Wtype = EQUAL )
 

double RazorBack::Orthpoly_::poly_fit ( unsigned int Deg )
 

poly_fit(Deg): fits orthogonal polynomials up to degree Deg to the data previously supplied via the data(...) method.

Returns the "goodness-of-fit" parameter. Throws Toofewexc_ if there are not enough data points.

void RazorBack::Orthpoly_::make_polycoeff ( )
 

make_polycoeff(): once the user is satisfied with the orthogonal fit, then this method should be called to calculate the parameters and standard deviations for the non-orthogonal estimation Y = p[0]+p[1]*x+...+p[Degree]*x^Degree.

double RazorBack::Orthpoly_::good_fit ( ) const [inline]
 

good_fit(): returns a "goodness-of-fit" value that indicates what percentage of Y is "explained" by the fit.

Definition at line 95 of file Orthpoly.hh.

double RazorBack::Orthpoly_::f_test ( ) const [inline]
 

f_test(): returns the F-statistic variable that can be tested later for significance.

Definition at line 104 of file Orthpoly.hh.

const Vecdbl_ & RazorBack::Orthpoly_::param ( ) const [inline]
 

param(): Returns the non-orthogonal parameter coefficients.

Invoke make_polycoeff() before calling this method.

Definition at line 116 of file Orthpoly.hh.

const Vecdbl_ & RazorBack::Orthpoly_::sdev ( ) const [inline]
 

sdev(): Returns the standard deviations of the non-orthogonal parameter coefficients.

Invoke make_polycoeff() before calling this method.

Definition at line 124 of file Orthpoly.hh.

const Smatdbl_ & RazorBack::Orthpoly_::correl ( ) const [inline]
 

correl(): Returns the correlation (normed covariance) matrix of the non-orthogonal parameter coefficients.

Invoke make_polycoeff() before calling this method.

Definition at line 132 of file Orthpoly.hh.

double RazorBack::Orthpoly_::approx ( double X ) const
 

approx(X): approximate Y(X) with the current polynomial.

void RazorBack::Orthpoly_::setup_weight ( const Vecdbl_ & Ymeas,
Weighting_ Weighting ) [protected]
 

void RazorBack::Orthpoly_::make_orthcoeff ( unsigned int Deg ) [protected]
 

void RazorBack::Orthpoly_::back_orthcoeff ( unsigned int Deg ) [protected]
 

int RazorBack::Orthpoly_::check_dim ( const Vecdbl_ & Xm,
const Vecdbl_ & Ym,
const Vecdbl_ & Wgt ) [static, protected]
 

void RazorBack::Orthpoly_::reset ( ) [protected]
 

void RazorBack::Orthpoly_::resize_orth ( unsigned int Maxdeg ) [protected]
 

void RazorBack::Orthpoly_::resize_param ( unsigned int Maxdeg ) [protected]
 

void RazorBack::Orthpoly_::make_orthpoly ( size_t Deg ) [protected]
 


Member Data Documentation

Vecdbl_ RazorBack::Orthpoly_::Xmeas [private]
 

Definition at line 42 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::W [private]
 

Definition at line 42 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Ymeas [private]
 

Definition at line 42 of file Orthpoly.hh.

size_t RazorBack::Orthpoly_::Nm [private]
 

Definition at line 43 of file Orthpoly.hh.

size_t RazorBack::Orthpoly_::Nf [private]
 

Definition at line 43 of file Orthpoly.hh.

Smatdbl_ RazorBack::Orthpoly_::Poly [private]
 

Definition at line 44 of file Orthpoly.hh.

Rmatdbl_ RazorBack::Orthpoly_::Polyval [private]
 

Definition at line 45 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Orthcoeff [private]
 

Definition at line 46 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Varorth [private]
 

Definition at line 46 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Param [private]
 

Definition at line 46 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Sdev [private]
 

Definition at line 46 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Dres [private]
 

Definition at line 46 of file Orthpoly.hh.

Vecdbl_ RazorBack::Orthpoly_::Norm [private]
 

Definition at line 46 of file Orthpoly.hh.

Smatdbl_ RazorBack::Orthpoly_::Correl [private]
 

Definition at line 49 of file Orthpoly.hh.

size_t RazorBack::Orthpoly_::Degree [private]
 

Definition at line 50 of file Orthpoly.hh.

size_t RazorBack::Orthpoly_::Maxdegree [private]
 

Definition at line 50 of file Orthpoly.hh.

double RazorBack::Orthpoly_::Sres [private]
 

Definition at line 51 of file Orthpoly.hh.

bool RazorBack::Orthpoly_::Makepolycoeff [private]
 

Definition at line 52 of file Orthpoly.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:17 2002 for The Razorback C++ Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001