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

Class that implements the virtual class OperationMatrix for the application of density estimation for the Systemmatrix by using a density difference function for two input datasets. More...

#include <DensityDifferenceSystemMatrix.hpp>

Inheritance diagram for sgpp::datadriven::DensityDifferenceSystemMatrix:
sgpp::base::OperationMatrix

Public Member Functions

void computeUnweightedRhs (base::DataVector &bp, base::DataVector &bq)
 Computes the unweighted right hand sides of the density estimation equation.
 
 DensityDifferenceSystemMatrix (base::Grid &grid, base::DataMatrix &trainData_P, base::DataMatrix &trainData_Q, base::OperationMatrix *C, double lambda)
 Std-Constructor.
 
 DensityDifferenceSystemMatrix (sgpp::base::OperationMatrix *A, sgpp::base::OperationMultipleEval *B_p, sgpp::base::OperationMultipleEval *B_q, sgpp::base::OperationMatrix *C, double lambda, size_t numSamples_P, size_t numSamples_Q)
 Std-Constructor.
 
void generateb (base::DataVector &b)
 Generates the right hand side of the classification equation.
 
void mult (base::DataVector &alpha, base::DataVector &result)
 Generates the left hand side of the density estimation equation.
 
virtual ~DensityDifferenceSystemMatrix ()
 Std-Destructor.
 
- Public Member Functions inherited from sgpp::base::OperationMatrix
 OperationMatrix ()
 Constructor.
 
virtual ~OperationMatrix ()
 Destructor.
 

Detailed Description

Class that implements the virtual class OperationMatrix for the application of density estimation for the Systemmatrix by using a density difference function for two input datasets.

Constructor & Destructor Documentation

◆ DensityDifferenceSystemMatrix() [1/2]

sgpp::datadriven::DensityDifferenceSystemMatrix::DensityDifferenceSystemMatrix ( sgpp::base::OperationMatrix A,
sgpp::base::OperationMultipleEval B_p,
sgpp::base::OperationMultipleEval B_q,
sgpp::base::OperationMatrix C,
double  lambda,
size_t  numSamples_P,
size_t  numSamples_Q 
)

Std-Constructor.

Parameters
AL^2 dot product matrix of some grid
B_pMultipleEval matrix of grid and data points for first dataset
B_qMultipleEval matrix of grid and data points for second dataset
Cthe regression functional
lambdathe regression parameter
numSamples_Pnumber of data samples for first dataset
numSamples_Qnumber of data samples for second dataset

◆ DensityDifferenceSystemMatrix() [2/2]

sgpp::datadriven::DensityDifferenceSystemMatrix::DensityDifferenceSystemMatrix ( base::Grid grid,
base::DataMatrix trainData_P,
base::DataMatrix trainData_Q,
base::OperationMatrix C,
double  lambda 
)

Std-Constructor.

Parameters
gridreference to the sparse grid
trainData_Preference to DataVector that contains the training data from first dataset
trainData_Qreference to DataVector that contains the training data from second dataset
Cthe regression functional
lambdathe regression parameter

References sgpp::op_factory::createOperationLTwoDotProduct(), sgpp::op_factory::createOperationMultipleEval(), and grid().

◆ ~DensityDifferenceSystemMatrix()

sgpp::datadriven::DensityDifferenceSystemMatrix::~DensityDifferenceSystemMatrix ( )
virtual

Std-Destructor.

Member Function Documentation

◆ computeUnweightedRhs()

void sgpp::datadriven::DensityDifferenceSystemMatrix::computeUnweightedRhs ( base::DataVector bp,
base::DataVector bq 
)

Computes the unweighted right hand sides of the density estimation equation.

Parameters
bpreference to the vector which will contain the result of the matrix vector multiplication on the rhs for first dataset
bqreference to the vector which will contain the result of the matrix vector multiplication on the rhs for second dataset

References sgpp::base::DataVector::setAll().

Referenced by generateb(), and sgpp::datadriven::ModelFittingDensityDifferenceEstimationCG::update().

◆ generateb()

void sgpp::datadriven::DensityDifferenceSystemMatrix::generateb ( base::DataVector b)

Generates the right hand side of the classification equation.

Parameters
breference to the vector which will contain the result of the matrix vector multiplication on the rhs

References sgpp::base::DataVector::axpy(), computeUnweightedRhs(), sgpp::base::DataVector::getSize(), and sgpp::base::DataVector::mult().

◆ mult()

void sgpp::datadriven::DensityDifferenceSystemMatrix::mult ( base::DataVector alpha,
base::DataVector result 
)
virtual

Generates the left hand side of the density estimation equation.

Parameters
alphaparameters for the sparse grid functions
resultreference to the vector which will contain the result

Implements sgpp::base::OperationMatrix.

References alpha, sgpp::base::DataVector::axpy(), sgpp::base::DataVector::getSize(), and sgpp::base::DataVector::setAll().


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