SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::datadriven::DBMatOnlineDEChol Class Reference

#include <DBMatOnlineDEChol.hpp>

Inheritance diagram for sgpp::datadriven::DBMatOnlineDEChol:
sgpp::datadriven::DBMatOnlineDE sgpp::datadriven::DBMatOnline

Public Member Functions

 DBMatOnlineDEChol (DBMatOffline &offline, Grid &grid, double lambda, double beta=0.)
 Constructor.
 
std::vector< size_t > updateSystemMatrixDecomposition (DensityEstimationConfiguration &densityEstimationConfig, Grid &grid, size_t numAddedGridPoints, std::vector< size_t > &deletedGridPointIndices, double lambda) override
 Delegates call to choleskyModification.
 
- Public Member Functions inherited from sgpp::datadriven::DBMatOnlineDE
void computeDensityDifferenceFunction (DataVector &alpha, DataMatrix &mp, DataMatrix &mq, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool save_b=false, bool do_cv=false)
 Computes the density difference function for two data matrix instances.
 
void computeDensityDifferenceFunction (DataVector &alpha, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool do_cv=false)
 Computes the density difference function again based on the saved b's (only applicable for streaming)
 
void computeDensityFunction (DataVector &alpha, DataMatrix &m, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool save_b=false, bool do_cv=false)
 Computes the density function for a certain data matrix.
 
void computeDensityFunction (DataVector &alpha, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool do_cv=false)
 Computes the density function again based on the saved b's (only applicable for streaming)
 
void computeDensityFunctionParallel (DataVectorDistributed &alpha, DataMatrix &m, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, const ParallelConfiguration &parallelConfig, std::shared_ptr< BlacsProcessGrid > processGrid, bool save_b=false, bool do_cv=false, std::list< size_t > *deletedPoints=nullptr, size_t newPoints=0)
 Computes the density function for a certain data matrix in parallel using ScaLAPACK.
 
void computeDensityFunctionParallel (DataVectorDistributed &alpha, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, const ParallelConfiguration &parallelConfig, std::shared_ptr< BlacsProcessGrid > processGrid, bool do_cv=false)
 Computes the density function again based on the saved b's (only applicable for streaming) in parallel on a cluster using ScaLAPACK.
 
DataVector computeWeightedBFromBatch (DataMatrix &m, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool weighted)
 Computes/updates the b vector for the given batch of data.
 
DataVectorDistributed computeWeightedBFromBatchParallel (DataMatrix &m, Grid &grid, const DensityEstimationConfiguration &densityEstimationConfig, const ParallelConfiguration &parallelConfig, std::shared_ptr< BlacsProcessGrid > processGrid, bool weighted)
 Computes/updates the b vector for the given batch of data in parallel using ScaLAPACK.
 
std::vector< DataVectorcomputeWeightedBFromBatchTwoDatasets (DataMatrix &mp, DataMatrix &mq, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool weighted)
 Initializes the b vector for the given batch of data in two datasets scenarios.
 
 DBMatOnlineDE (DBMatOffline &offline, Grid &grid, double lambda, double beta=0.)
 Constructor.
 
double eval (DataVector &alpha, const DataVector &p, Grid &grid, bool force=false)
 Evaluates the density function at a certain point.
 
void eval (DataVector &alpha, DataMatrix &values, DataVector &results, Grid &grid, bool force=false)
 Evaluates the density function on multiple points.
 
void evalParallel (DataVector &alpha, DataMatrix &values, DataVectorDistributed &results, Grid &grid, bool force=false)
 Evaluates the density function on multiple points using parallelization.
 
double getBeta ()
 Returns the current weighting factor.
 
bool isComputed ()
 Returns if the surplus has already been computed.
 
double normalize (DataVector &alpha, Grid &grid, size_t samples=1000)
 Normalize the Density.
 
double normalizeQuadrature (DataVector &alpha, Grid &grid)
 Normalize the Density using Quadrature.
 
void resetTraining ()
 Resets the training state of the model.
 
void setBeta (double beta)
 Sets the weighting factor.
 
virtual void syncDistributedDecomposition (std::shared_ptr< BlacsProcessGrid > processGrid, const ParallelConfiguration &parallelConfig)
 Synchronizes the distributed decomposition, only has an effect if ScaLAPACK is used.
 
void updateRhs (size_t gridSize, std::vector< size_t > &deletedPoints)
 Restructures the rhs (b vector) of the system matrix.
 
- Public Member Functions inherited from sgpp::datadriven::DBMatOnline
 DBMatOnline (const DBMatOnline &rhs)=delete
 
 DBMatOnline (DBMatOffline &o)
 Constructor.
 
 DBMatOnline (DBMatOnline &&rhs)=default
 
DBMatOfflinegetOfflineObject ()
 Returns a reference to the offline object.
 
const DBMatOfflinegetOfflineObject () const
 
DBMatOnlineoperator= (const DBMatOnline &rhs)=delete
 
DBMatOnlineoperator= (DBMatOnline &&rhs)=delete
 
void setLambda (double lambda)
 
virtual ~DBMatOnline ()=default
 Destructor.
 

Protected Member Functions

DBMatDMSCholbuildCholSolver (DBMatOffline &offlineObject, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool doCV) const
 
void solveSLE (DataVector &alpha, DataVector &b, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool do_cv) override
 
void solveSLEParallel (DataVectorDistributed &alpha, DataVectorDistributed &b, Grid &grid, DensityEstimationConfiguration &densityEstimationConfig, bool do_cv) override
 Parallel and distributed version of solveSLE.
 
- Protected Member Functions inherited from sgpp::datadriven::DBMatOnlineDE
double computeL2Error (DataVector &alpha, Grid &grid)
 
double resDensity (DataVector &alpha, Grid &grid)
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::datadriven::DBMatOnlineDE
double beta
 
DataVector bSave
 
std::unique_ptr< DataVectorDistributedbSaveDistributed
 
DataVector bSaveExtra
 
DataVector bTotalPoints
 
std::unique_ptr< DataVectorDistributedbTotalPointsDistributed
 
DataVector bTotalPointsExtra
 
bool distributedVectorsInitialized
 
bool functionComputed
 
double lambda
 
bool localVectorsInitialized
 
double normFactor
 
size_t oDim
 
DataMatrixtestMat
 
DataMatrixtestMatRes
 
bool useExtraLocalVectors
 
- Protected Attributes inherited from sgpp::datadriven::DBMatOnline
DBMatOfflineofflineObject
 

Constructor & Destructor Documentation

◆ DBMatOnlineDEChol()

sgpp::datadriven::DBMatOnlineDEChol::DBMatOnlineDEChol ( DBMatOffline offline,
Grid grid,
double  lambda,
double  beta = 0. 
)
explicit

Constructor.

Parameters
offlineThe offline object we base our evaluations on.
lambdaThe regularization strength (TODO(fuchsgruber) remove this)
gridThe underlying grid (TODO(fuchsgruber) do we need this?)
betaThe initial weighting factor

Member Function Documentation

◆ buildCholSolver()

◆ solveSLE()

◆ solveSLEParallel()

void sgpp::datadriven::DBMatOnlineDEChol::solveSLEParallel ( DataVectorDistributed alpha,
DataVectorDistributed b,
Grid grid,
DensityEstimationConfiguration densityEstimationConfig,
bool  do_cv 
)
overrideprotectedvirtual

◆ updateSystemMatrixDecomposition()

std::vector< size_t > sgpp::datadriven::DBMatOnlineDEChol::updateSystemMatrixDecomposition ( DensityEstimationConfiguration densityEstimationConfig,
Grid grid,
size_t  numAddedGridPoints,
std::vector< size_t > &  deletedGridPointIndices,
double  lambda 
)
overridevirtual

Delegates call to choleskyModification.

Parameters
densityEstimationConfigConfiguration to the density estimation
gridthe underlying grid
numAddedGridPointsNumber of grid points inserted at the end of the grid storage
deletedGridPointIndicesIndices of grid points that were deleted
lambdaThe last best lambda value
Returns
list of grid points, that cannot be coarsened

Reimplemented from sgpp::datadriven::DBMatOnline.

References sgpp::datadriven::DBMatOnline::getOfflineObject(), grid(), sgpp::datadriven::DBMatOnlineDE::lambda, and sgpp::datadriven::DBMatOnline::offlineObject.


The documentation for this class was generated from the following files: