GClasses

GClasses::GNormalize Class Reference

This transform scales and shifts continuous values to make them fall within a specified range. More...

#include <GTransform.h>

Inheritance diagram for GClasses::GNormalize:
GClasses::GTwoWayIncrementalTransform GClasses::GIncrementalTransform GClasses::GTransform

List of all members.

Public Member Functions

 GNormalize (double min=0.0, double max=1.0)
 min and max specify the target range. (The input domain is determined automatically when train is called.)
 GNormalize (GDomNode *pNode, GLearnerLoader &ll)
 Load from a DOM.
virtual ~GNormalize ()
virtual GDomNodeserialize (GDom *pDoc)
 Marshal this object into a DOM, which can then be converted to a variety of serial formats.
virtual void train (GMatrix &data)
 See the comment for GIncrementalTransform::train.
virtual void transform (const double *pIn, double *pOut)
 See the comment for GIncrementalTransform::transform.
virtual void untransform (const double *pIn, double *pOut)
 See the comment for GTwoWayIncrementalTransform::untransform.
virtual void untransformToDistribution (const double *pIn, GPrediction *pOut)
 See the comment for GTwoWayIncrementalTransform::untransformToDistribution.
void setMinsAndRanges (sp_relation &pRel, const double *pMins, const double *pRanges)
 Specify the input min and range values for each attribute.

Protected Attributes

double m_min
double m_max
double * m_pMins
double * m_pRanges

Detailed Description

This transform scales and shifts continuous values to make them fall within a specified range.


Constructor & Destructor Documentation

GClasses::GNormalize::GNormalize ( double  min = 0.0,
double  max = 1.0 
)

min and max specify the target range. (The input domain is determined automatically when train is called.)

GClasses::GNormalize::GNormalize ( GDomNode pNode,
GLearnerLoader ll 
)

Load from a DOM.

virtual GClasses::GNormalize::~GNormalize ( ) [virtual]

Member Function Documentation

virtual GDomNode* GClasses::GNormalize::serialize ( GDom pDoc) [virtual]

Marshal this object into a DOM, which can then be converted to a variety of serial formats.

Implements GClasses::GIncrementalTransform.

void GClasses::GNormalize::setMinsAndRanges ( sp_relation pRel,
const double *  pMins,
const double *  pRanges 
)

Specify the input min and range values for each attribute.

virtual void GClasses::GNormalize::train ( GMatrix data) [virtual]
virtual void GClasses::GNormalize::transform ( const double *  pIn,
double *  pOut 
) [virtual]
virtual void GClasses::GNormalize::untransform ( const double *  pIn,
double *  pOut 
) [virtual]
virtual void GClasses::GNormalize::untransformToDistribution ( const double *  pIn,
GPrediction pOut 
) [virtual]

Member Data Documentation

double GClasses::GNormalize::m_max [protected]
double GClasses::GNormalize::m_min [protected]
double* GClasses::GNormalize::m_pMins [protected]
double* GClasses::GNormalize::m_pRanges [protected]