GClasses
GClasses::GDataColSplitter Class Reference

Detailed Description

This class divides a matrix into two parts. The left-most columns are the features. The right-most columns are the labels.

#include <GMatrix.h>

Public Member Functions

 GDataColSplitter (const GMatrix &data, size_t labels)
 Splits a dataset into a feature matrix and a label matrix. The right-most "labels" columns are put in the label matrix. More...
 
 ~GDataColSplitter ()
 
GMatrixfeatures ()
 Returns a reference to the feature matrix. More...
 
GMatrixlabels ()
 Returns a reference to the label matrix. More...
 

Protected Attributes

GMatrixm_pFeatures
 
GMatrixm_pLabels
 

Constructor & Destructor Documentation

GClasses::GDataColSplitter::GDataColSplitter ( const GMatrix data,
size_t  labels 
)

Splits a dataset into a feature matrix and a label matrix. The right-most "labels" columns are put in the label matrix.

GClasses::GDataColSplitter::~GDataColSplitter ( )

Member Function Documentation

GMatrix& GClasses::GDataColSplitter::features ( )
inline

Returns a reference to the feature matrix.

GMatrix& GClasses::GDataColSplitter::labels ( )
inline

Returns a reference to the label matrix.

Member Data Documentation

GMatrix* GClasses::GDataColSplitter::m_pFeatures
protected
GMatrix* GClasses::GDataColSplitter::m_pLabels
protected