# w2kmeans::PolynomialFit Class Reference

List of all members.

## Detailed Description

Fits a polynomial to data points.

Author:
lakshman
Version:
Id
w2kmeans_PolynomialFit.h,v 1.3 2009/06/16 21:39:08 lakshman Exp

## Public Member Functions

PolynomialFit (const std::string &nameIn, int order=1)
const std::string & getName () const
const std::vector< double > & getCoeff ()
The coefficients are returned so that the first coefficient is the multiplier for x^(N-1).
double getYForX (double x)
bool isValid () const
enough points for a valid fit?
double update (const std::vector< double > &x, const std::vector< double > &y)
update with all points, and return rmserror on data
double computeMonotonicFitError (const std::vector< double > &x, const std::vector< double > &y)
update with all delta of points, and return rmserror on data.

## Constructor & Destructor Documentation

 w2kmeans::PolynomialFit::PolynomialFit ( const std::string & nameIn, int order = `1` ) ` [inline]`

## Member Function Documentation

 double w2kmeans::PolynomialFit::computeMonotonicFitError ( const std::vector< double > & x, const std::vector< double > & y )

update with all delta of points, and return rmserror on data.

This is useful if your intent is to verify that the data are monotonic; the actual fit itself will be on the deltas, so you can not use the getYForX() to get an estimate of data.

 const std::vector& w2kmeans::PolynomialFit::getCoeff ( ) ` [inline]`

The coefficients are returned so that the first coefficient is the multiplier for x^(N-1).

 const std::string& w2kmeans::PolynomialFit::getName ( ) const` [inline]`

 double w2kmeans::PolynomialFit::getYForX ( double x ) ` [inline]`

 bool w2kmeans::PolynomialFit::isValid ( ) const` [inline]`

enough points for a valid fit?

 double w2kmeans::PolynomialFit::update ( const std::vector< double > & x, const std::vector< double > & y )

update with all points, and return rmserror on data

Generated on Fri May 4 13:40:24 2012 for WDSS-IIw2algs by 1.4.7