Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
NumVLDataSetC::NumVLDataSetC(void)
NumVLDataSetC::NumVLDataSetC(const DListC &,const DListC &)
NumVLDataSetC::NumVLDataSetC(const DListC &)
NumVLDataSetC::NumVLDataSetC(const DListC &)
NumVLDataSetC::NumVLDataSetC(const DListC &,const NumLabelC &)
NumVLDataSetC::NumVLDataSetC(const SArray1dC &,const VectorC &,IntT)
NumVLDataSetC::NumVLDataSetC(istream &)
NumVLDataSetC::NumVLDataSetC(const FilenameC &)
NumVLDataSetC::NumVLDataSetC(const NumVLDataSetC &)
NumVLDataSetC::NumVLDataSetC(const NumDataSetC &)
NumVLDataSetC::NumVLDataSetC(const NumVVDataSetC &)
NumVLDataSetC::Copy(void) const
NumVLDataSetC::GenerateHighleyman(IntT,IntT)
NumVLDataSetC::ExtractPerLabel(UIntT,BooleanT) const
NumVLDataSetC::MaxLabel(void) const
NumVLDataSetC::SortByLabel(void)
NumVLDataSetC::LabelSums(void) const
NumVLDataSetC::ClassMeans(void) const
NumVLDataSetC::ClassStats(void) const
NumVLDataSetC::BetweenClassScatter(void) const
NumVLDataSetC::WithinClassScatter(void) const
NumVDataSetC::Copy(void) const
NumVDataSetC::InputSize(void) const
NumVDataSetC::InputMean(void) const
NumVDataSetC::InputStats(void) const
NumVDataSetC::NormaliseInput(const VecMatC &)
NumVDataSetC::MinMax(void) const
NumVDataSetC::Scale(const SArray1dC &)
NumVDataSetC::Subset(const IntSArray1dC &) const
NumDataSetC::Copy(void) const
NumDataSetC::InputSet(void) const
NumDataSetC::InputSet(const OutputC &) const
NumDataSetC::OutputSet(void) const
NumDataSetC::OutputSet(const InputC &) const
NumDataSetC::Shuffle(void)
NumDataSetC::Extract(RealT)
NumDataSetC::Extract(UIntT,UIntT)
NumDataSetC::Append(const NumDataSetC &)
NumDataSetC::Append(const InputC &,const OutputC &)
NumDataSetC::Save(ostream &) const
NumDataSetC::Save(const FilenameC &) const
DListC::Copy(void) const
DListC::operator=(const DListC &)
DListC::Body(void)
DListC::Tail(BaseBodyConstDLIterC &)
DListC::Head(BaseBodyConstDLIterC &)
DListC::Size(void) const
DListC::operator==(const DListC &) const
DListC::operator!=(const DListC &) const
DListC::IsEmpty(void) const
DListC::ConsistencyCheck(LongIntT) const
DListC::First(void) const
DListC::First(void)
DListC::Last(void) const
DListC::Last(void)
DListC::operator[](IndexT) const
DListC::operator[](IndexT)
DListC::InsFirst(const DataC &)
DListC::InsLast(const DataC &)
DListC::DelFirst(void)
DListC::DelLast(void)
DListC::GetFirst(void)
DListC::GetLast(void)
DListC::MakeFirst(BaseBodyConstDLIterC &)
DListC::MakeLast(BaseBodyConstDLIterC &)
DListC::MoveFirst(BaseBodyConstDLIterC &)
DListC::MoveLast(BaseBodyConstDLIterC &)
DListC::MoveFirst(DListC &)
DListC::MoveLast(DListC &)
DListC::operator+=(const DListC &)
DListC::operator+=(const DataC &)
DListC::Reverse(void)
DListC::Empty(void)
DListC::LessOrEqualDefault(const DataC &,const DataC &)
DListC::MergeSort(DListC::LessOrEqualFuncT)
DListC::BubbleSort(DListC::LessOrEqualFuncT)
DListC::Hash(void) const
NumVLDataSetC
 
Refines NumVDataSetC to specify output type is NumLabelC.
 
include "amma/Num/NumDataSet.hh"
User Level:Default
Library:NumData
Example:testSquareIterFill.cc
Section:Pattern Recognition.Data Types Numerical Methods.Data Types
In Scope:std

Comments:
Refinement of NumDataSetC through NumVDataSetC to give data set with input type VectorC and output data type NumLabelC.

NumVLDataSetC is used to store data sets for use with classes derived from NumPDFC, NumClassifyC and NumReduceC. In each case, the elements are assumed to represent a data pair consisting of a feature vector and corresponding class label.

Parent Classes: Methods:
NumVLDataSetC()
Default constructor
Default constructor for NumVDataSetC is called.

NumVLDataSetC(const DListC<VectorC> & input,const DListC<NumLabelC> & output)
Constructor taking lists of input and output values

NumVLDataSetC(const DListC<NumVLDataC> & list)
Constructor from a list of data elements

NumVLDataSetC(const DListC<VectorC> & input)
Constructor from a list of inputs, corresponding outputs set to zero

NumVLDataSetC(const DListC<VectorC> & input,const NumLabelC & label)
Constructor from a list of inputs, all outputs set to label

NumVLDataSetC(const SArray1dC<VecMatC> & params,const VectorC & priors,IntT pts)
Make a multi-dimensional normal dataset with user specified params
paramsArray of mean and covariance's of dataset required
priorscorresponding weights for each component of dataset
pts total number of points in dataset (pts for each mixture worked out from priors)

NumVLDataSetC(istream & in)
Constructs from stream

NumVLDataSetC(const FilenameC & in)
Constructs from file

NumVLDataSetC(const NumVLDataSetC & oth)
Copy constructor

NumVLDataSetC(const NumDataSetC<VectorC,NumLabelC> & oth)
Copy constructor (sort of!)

NumVLDataSetC(const NumVVDataSetC & oth)
Constructs from Vector,Vector data set
Converts probability vectors to class labels using VecToLabel.

NumVLDataSetC & Copy() const
Makes a copy of the current object

void GenerateHighleyman(IntT Na,IntT Nb)
Generate dataset according to Highleyman. ([1 1][1 0;0 0.25]) and ([2 0][0.01 0;0 4]) beware that this function deletes the data already stored in your dataset
Nanumber of samples in class A
Nbnumber of samples in class B

NumVLDataSetC ExtractPerLabel(UIntT numSamples,BooleanT check = TRUE) const
Extracts data set containing first numSamples of each label value.
numSamplesnumber of samples to find for each label value
check whether or not to check if there were enough samples in each class
Note that this function does not shuffle the data set.

UIntT MaxLabel() const
Finds the highest label in the data set

void SortByLabel()
Sorts data set by label value

IntSArray1dC LabelSums() const
Returns array containing the count of each label value

SArray1dC<VectorC> ClassMeans() const
Returns mean of input vectors for each label value

SArray1dC<VecMatC> ClassStats() const
Returns mean and covariance of input vectors for each label value

MatrixC BetweenClassScatter() const
Returns between class scatter (covariance) matrix

MatrixC WithinClassScatter() const
Returns within class scatter (covariance) matrix

NumVDataSetC<NumLabelC> & Copy() const
Makes a copy of the object

UIntT InputSize() const
Input vector dimension

VectorC InputMean() const
Determines the mean of the input vectors

VecMatC InputStats() const
Determines statistics (mean and covariance) of the input vectors

void NormaliseInput(const VecMatC & stats)
Normalises the input vectors using given stats
In order to achieve zero mean and unity variance this function should be called with the return value from InputStats. Subsequent data sets can then be normalised the same way by recording the VecMatC returned by InputStats.

SArray1dC<MinMax1dC> MinMax() const
Return the minimum and maximum feature value of each feature dimension

void Scale(const SArray1dC<MinMax1dC> & arr)
Scale all the individual feature dimensions between min and max

DListC<VectorC> Subset(const IntSArray1dC & ind) const
Returns a input set which is a subset of original dataset
indarray containing feature indices

NumDataSetC<VectorC,NumLabelC> & Copy() const
Makes a copy of the current object

DListC<VectorC> InputSet() const
Exports a list of input types

DListC<VectorC> InputSet(const NumLabelC & output) const
Extracts all input data which has the given output value..
output output of associated input data vectors to be extracted

DListC<NumLabelC> OutputSet() const
Exports a list of output types

DListC<NumLabelC> OutputSet(const VectorC & input) const
Exports a list of output types which has the given input value..

void Shuffle()
Shuffles all the elements in the data set into random order

NumDataSetC<VectorC,NumLabelC> Extract(RealT proportion)
Extracts a subset from the data set
proportionthe subset will contain this proportion of the original set
A proportional subset of the initial data set will be extracted from the front of the input set. Note that the data set is NOT shuffled by this function and if this is required then it should be called earlier by the user. The input set will have the extacted data removed from it. If you desire to keep the original data set then you should copy it before using this function.

NumDataSetC<VectorC,NumLabelC> Extract(UIntT numSamples,UIntT offset = 0)
Extracts a subset from the data set
numSamplesspecifies number of samples for subset
offset consecutive samples starting from offset
This creates a new data set by removing samples from the input set. The sample in position offset will be found then numSample consecutive samples will be extracted for the output set. Note that the data set is NOT shuffled by this function and if this is required then it should be called earlier by the user. The input set will have the extacted data removed from it. If you desire to keep the original data set then you should copy it before using this function.

void Append(const NumDataSetC<VectorC,NumLabelC> & oth)
Appends oth data set to the current one

void Append(const VectorC & input,const NumLabelC & output)
Appends NumDataC(input,output) to the data set

void Save(ostream & out) const
Writes object to stream, can be loaded using constructor

void Save(const FilenameC & out) const
Writes object to file, can be loaded using constructor

#include "amma/DList.hh"
DListC<NumDataC<InputC,OutputC>> Copy() const
Create a copy of this list.

const DListC<NumDataC<InputC,OutputC>> & operator=(const DListC<NumDataC<InputC,OutputC>> & l)
Both this list and the list 'l' will be the same list.
The old list will be emptied if there is no other references to it.

BodyDListC<NumDataC<InputC,OutputC>> & Body()

DListC<NumDataC<InputC,OutputC>> Tail(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & ptr)
Splits the list into two parts.
This list will contain the beginning of the original list. The function returns the second part of the original list including the element 'ptr'.

DListC<NumDataC<InputC,OutputC>> Head(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & ptr)
Splits the list into two parts.
This list will contain the second part of the original list including the element 'ptr'. The function returns the list containing the beginning of the original list. Status functions ----------------

BaseDListC::ListSizeT Size() const
Returns the length of a list. It does not check the counter overflow.

BooleanT operator==(const DListC<NumDataC<InputC,OutputC>> & list) const
Returns TRUE if both lists represent the same list.

BooleanT operator!=(const DListC<NumDataC<InputC,OutputC>> & list) const
Returns TRUE if both lists are independent.

BooleanT IsEmpty() const
Returns TRUE if the list is empty.

void ConsistencyCheck(LongIntT stopSize = 30000) const
Checks the list if all links are valid.
If the counter of elements during the checking overflows the number 'stopSize', the function exits with error. Access to the elements ----------------------

const NumDataC<InputC,OutputC> & First() const
Returns the first element of the constant list.

NumDataC<InputC,OutputC> & First()
Returns the first element of the list.

const NumDataC<InputC,OutputC> & Last() const
Returns the last element of the constant list.

NumDataC<InputC,OutputC> & Last()
Returns the last element of the constant list.

const NumDataC<InputC,OutputC> & operator[](IndexT i) const
Returns the i-th element of the constant list.
The first element has the index 0.

NumDataC<InputC,OutputC> & operator[](IndexT i)
Returns the i-th element of the list.
The first element has the index 0. Elementary changes in the list ------------------------------

DListC<NumDataC<InputC,OutputC>> & InsFirst(const NumDataC<InputC,OutputC> & data)
Inserts the new element at the beginning of the list.
Returns the reference to the changed list.

DListC<NumDataC<InputC,OutputC>> & InsLast(const NumDataC<InputC,OutputC> & data)
Inserts the new element at the end of the list.
Returns the pointer to the list.

DListC<NumDataC<InputC,OutputC>> & DelFirst()
Deletes the first element of the list.
Returns the reference to the list.

DListC<NumDataC<InputC,OutputC>> & DelLast()
Deletes the last element of the list.
Returns the reference to the list.

NumDataC<InputC,OutputC> GetFirst()
Removes the first element from the list.
Returns that removed element.

NumDataC<InputC,OutputC> GetLast()
Removes the last element from the list.
Returns that removed element.

DListC<NumDataC<InputC,OutputC>> & MakeFirst(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & ptr)
Moves the head of the list to be the predeccessor of the element pointed to be 'ptr'.
The iterator 'ptr' must belong to this list. Returns the reference to the list.

DListC<NumDataC<InputC,OutputC>> & MakeLast(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & ptr)
Moves the head of the list to be the successor of the element pointed to by 'ptr'.
The iterator 'ptr' must belong to this list. Returns the reference to the list.

DListC<NumDataC<InputC,OutputC>> & MoveFirst(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & ptr)
Moves the list element pointed to by 'ptr' into the list as the first element.
The pointed list element need not to be the element of this list, but it cannot be the head of any list. Returns this list.

DListC<NumDataC<InputC,OutputC>> & MoveLast(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & ptr)
Moves the list element, which 'ptr' points to, into the list as the last element.
The pointed list element need not to be the element of this list, but it cannot be the head of any list. Returns this list. Transformations of lists ------------------------

DListC<NumDataC<InputC,OutputC>> & MoveFirst(DListC<NumDataC<InputC,OutputC>> & list)
Moves the whole 'list' to the beginning of this list.
The 'list' will be empty after the operation. Returns this list.

DListC<NumDataC<InputC,OutputC>> & MoveLast(DListC<NumDataC<InputC,OutputC>> & list)
Moves the whole 'list' to the end of this list.
The 'list' will be empty after the operation. Returns this list.

const DListC<NumDataC<InputC,OutputC>> & operator+=(const DListC<NumDataC<InputC,OutputC>> & list)
Concatenation.
The operator moves the whole 'list to the end of this list. The 'list' will be EMPTY after the operation.

The arg is only constant so that 'list' may be a tempory without causing warnings.

Returns this list.


const DListC<NumDataC<InputC,OutputC>> & operator+=(const NumDataC<InputC,OutputC> & list)
Concatenation an element.
This is just an alias for InsLast(). Returns this list.

DListC<NumDataC<InputC,OutputC>> & Reverse()
Reverses the list. Returns the list.

DListC<NumDataC<InputC,OutputC>> & Empty()
All elements of the list will be destroyed.

int LessOrEqualDefault(const NumDataC<InputC,OutputC> & el1,const NumDataC<InputC,OutputC> & el2)

void MergeSort(DListC<NumDataC<InputC,OutputC>>::LessOrEqualFuncT func)
Sorts the list according to order defined by the comparing function 'LessOrEqual'.
The default function uses the > operator of the class to do the sort. If no such operator exists one will be created that prints an error message then aborts the code.

void BubbleSort(DListC<NumDataC<InputC,OutputC>>::LessOrEqualFuncT func)
Sorts the list according to order defined by the comparing function 'LessOrEqual'.
The default function uses the > operator of the class to do the sort. If no such operator exists one will be created that prints an error message then aborts the code.

UIntT Hash() const
Get a hash value unique to this list.
it does not depend in anyway on the contents of the list.


Programmer:Robert Crida, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001