DataGeneratorBase

class DataGeneratorBase

Subclassed by DataGeneratorClassification, DataGeneratorRegression

Public Functions

DataGeneratorBase(Config *settings)

Class constructor. Generates training data for neural network approaches using spherical harmonics and an entropy functional and the quadrature specified by the options file.

Parameters:

settings – config class with global information

virtual void ComputeTrainingData() = 0

computes the training data set. Realizable set is sampled uniformly. Prototype: 1D, u in [0,100]

Public Static Functions

static DataGeneratorBase *Create(Config *settings)

Create a datagenerator (1D or 3D)

Parameters:

settings – Pointer to the config file

Returns:

Pointer to the createt basis class

Protected Functions

virtual void SampleMultiplierAlpha()

Sample Lagrange multipliers alpha.

void ComputeRealizableSolution()

make u the realizable moment to alpha, since Newton has roundoff errors.

virtual void PrintTrainingData() = 0

: Print computed training data to csv file and screen

void PrintLoadScreen()

Print screen IO.

virtual void ComputeMoments() = 0

Pre-Compute Moments at all quadrature points.

bool ComputeEVRejection(unsigned idx_set)

Evalute rejection criterion based on the smallest Eigenvalue of the Hessian corresponding to alpha[idx_set].

bool ComputeReducedEVRejection(VectorVector &redMomentBasis, Vector &redAlpha)

Evalute rejection criterion based on the smallest Eigenvalue of the reduced Hessian corresponding to alpha[idx_set].

Protected Attributes

Config *_settings

config class for global information

VectorVector _uSol

vector with moments. Size: (setSize,basisSize)

VectorVector _alpha

vector with Lagrange multipliers. Size: (setSize,basisSize)

unsigned long _setSize

Size of the whole training Set.

unsigned short _maxPolyDegree

Max Order of Spherical Harmonics.

unsigned _nTotalEntries

Total number of equations in the system.

QuadratureBase *_quadrature

quadrature to create members below

unsigned _nq

number of quadrature points

VectorVector _quadPoints

quadrature points, dim(_quadPoints) = (_nq,spatialDim)

Vector _weights

quadrature weights, dim(_weights) = (_nq)

VectorVector _quadPointsSphere

(my,phi), dim(_quadPoints) = (_nq,2)

SphericalBase *_basisGenerator

Class to compute and store current spherical harmonics basis.

VectorVector _momentBasis

Moment Vector pre-computed at each quadrature point: dim= _nq x _nTotalEntries.

NewtonOptimizer *_optimizer

Class to solve minimal entropy problem.

EntropyBase *_entropy

Class to handle entropy functional evaluations.

bool _reducedSampling

Flag to show if the reduced optimizer is used.