Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

SvmData Class Reference
[Svm]

#include <SvmData.h>

Inheritance diagram for SvmData:

Data List of all members.

Public Member Functions

 SvmData (int hyperplanedim_in, int nobservations_in, double penalty)
 SvmData (int hyperplanedim_in, int nobservations_in, double *X, double *d, double penalty)
 ~SvmData ()
virtual void YMult (double beta, SimpleVector &y, double alpha, SimpleVector &x)
virtual void YTransMult (double beta, SimpleVector &y, double alpha, SimpleVector &x)
virtual double dotCategories (SimpleVector &v)
virtual double datanorm ()
virtual void datarandom ()
virtual void datainput ()
virtual void print ()
double penalty ()

Static Public Member Functions

SvmDatatextInput (char filename[], double penalty, int &iErr)

Public Attributes

double mPenalty
int hyperplanedim
int nobservations
DenseGenMatrixHandle Yt
SimpleVectorHandle categories

Detailed Description

Data class for Svm.


Constructor & Destructor Documentation

SvmData::SvmData int  hyperplanedim_in,
int  nobservations_in,
double  penalty
 

Constructor that makes object with specified dimensions

Parameters:
hyperplanedim_in dimenion of Euclidean space in which each obseration resides
nobservations_in number of observations
penalty penalty parameter for violation term in objective

SvmData::SvmData int  hyperplanedim_in,
int  nobservations_in,
double *  X,
double *  d,
double  penalty
 

Constructor that makes object with specified dimensions, using storage already allocated

Parameters:
hyperplanedim_in dimension of Euclidean space in which each observation resides
nobservations_in number of observations
X array of doubles containing observation points stored one after another
d array of doubles containing list of labels for the points
penalty penalty parameter for violation term in objective

SvmData::~SvmData  ) 
 

Destructor for data class


Member Function Documentation

virtual double SvmData::datanorm  )  [virtual]
 

compute the norm of the problem data

Implements Data.

virtual double SvmData::dotCategories SimpleVector v  )  [virtual]
 

form inner product of v with the categories vector

virtual void SvmData::print  )  [inline, virtual]
 

print the problem data

Implements Data.

SvmData* SvmData::textInput char  filename[],
double  penalty,
int &  iErr
[static]
 

Reads Svm data from given input file

Parameters:
filename name of input file. First entry of file is an integer "nobservations" representing number of observations. Second entry "hyperplanedim" is an integer representing dimension of the Euclidean space in which each point resides. Subsequent entries consist of sequences of (hyperplanedim) doubles representing one of the observation points, following by a single double representing teh label for that point. The labels must take on two distinct values.
penalty penalty parameter for violation term in objective
iErr returns 0 if OK, otherwise indicates error if file not found or input faulty

virtual void SvmData::YMult double  beta,
SimpleVector y,
double  alpha,
SimpleVector x
[virtual]
 

Perform a saxpy operation with matrix Y

y <- beta y + alpha Yx

virtual void SvmData::YTransMult double  beta,
SimpleVector y,
double  alpha,
SimpleVector x
[virtual]
 

Perform a saxpy operation with matrix Yt

y <- beta y + alpha Y^T x


Member Data Documentation

SimpleVectorHandle SvmData::categories
 

vector of dimension nobservations containing the labels of the points

int SvmData::hyperplanedim
 

dimension of Euclidean space in which each observation resides

double SvmData::mPenalty
 

penalty parameter for violation term in objective

int SvmData::nobservations
 

number of observations

DenseGenMatrixHandle SvmData::Yt
 

Y is an N x (t+1) matrix in which each row consists of t entries representing a point, followed by a "1". Each row corresponding to one of the two distinct labels is then multiplied by -1. Yt stores the the transpose of Y.


The documentation for this class was generated from the following file:
Generated on Wed Mar 22 13:58:35 2006 for OOQP by doxygen 1.3.5