philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Set Struct Reference

#include <DataSet.h>

Public Member Functions

 Set ()=default
 
 Set (size_t inputCount, size_t outputCount)
 
 Set (const char *fileName, size_t inputCount, size_t outputCount)
 
void ReadFromFile (const char *fileName)
 
Set GetBatch (int batchSize) const
 
void NormalizeSetMean ()
 
void NormalizeRowMean ()
 
void NormalizeColMean ()
 
void Normalize (NormalizerMethod method=NormalizerMethod::SET_MEAN)
 

Public Attributes

Matrix< double > Input
 input data More...
 
Matrix< double > Output
 expected output data More...
 
size_t InputCount = 0
 number of input elements More...
 
size_t OutputCount = 0
 number of output elements More...
 
size_t count = 0
 number of input-output pairs More...
 

Detailed Description

Representation of

Examples
ds/TestKNN.cpp.

Constructor & Destructor Documentation

◆ Set() [1/3]

Set::Set ( )
default

default constructor

◆ Set() [2/3]

Set::Set ( size_t  inputCount,
size_t  outputCount 
)
inline

initialization constructor, just sets input and output dimensions

Parameters
inputCountnumber input elements
outputCountnumber output elements

◆ Set() [3/3]

Set::Set ( const char *  fileName,
size_t  inputCount,
size_t  outputCount 
)
inline

Constructor which immediately reads a given set file

Parameters
fileNamefile name to read from
inputCountnumber input elements
outputCountnumber output elements

Member Function Documentation

◆ GetBatch()

Set Set::GetBatch ( int  batchSize) const
inline

Generates batch of given size based on inputs and outputs

Parameters
batchSizenumber elements per batch
Returns

◆ Normalize()

void Set::Normalize ( NormalizerMethod  method = NormalizerMethod::SET_MEAN)
inline

helper to normalize set based on NormalizerMethod

Parameters
methodrepresentation of normalization method

◆ NormalizeColMean()

void Set::NormalizeColMean ( )
inline

Normalizes set by computing mean over columns

◆ NormalizeRowMean()

void Set::NormalizeRowMean ( )
inline

Normalizes set by computing mean over rows

◆ NormalizeSetMean()

void Set::NormalizeSetMean ( )
inline

Normalizes set by computing mean over all elements

◆ ReadFromFile()

void Set::ReadFromFile ( const char *  fileName)
inline

reads content from file

File needs to have tab separated records

Parameters
fileName

Member Data Documentation

◆ count

size_t Set::count = 0

number of input-output pairs

◆ Input

Matrix<double> Set::Input

input data

Examples
ds/TestKNN.cpp.

◆ InputCount

size_t Set::InputCount = 0

number of input elements

◆ Output

Matrix<double> Set::Output

expected output data

Examples
ds/TestKNN.cpp.

◆ OutputCount

size_t Set::OutputCount = 0

number of output elements


The documentation for this struct was generated from the following file: