SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::optimization::InterpolatedFuzzyInterval Class Reference

Fuzzy interval by piecewise linear interpolation of sample points \((x_i, \alpha_i)\) of the membership function \(\mu_{\tilde{x}}\), i.e., \(\mu_{\tilde{x}}(x_i) = \alpha_i\) ( \(i = 1, \dotsc, n\)). More...

#include <InterpolatedFuzzyInterval.hpp>

Inheritance diagram for sgpp::optimization::InterpolatedFuzzyInterval:
sgpp::optimization::FuzzyIntervalViaMembershipFunction sgpp::optimization::FuzzyInterval

Public Member Functions

double evaluateMembershipFunction (double x) const override
 Evaluate the membership function.
 
const base::DataVectorgetAlphaData () const
 
const base::DataVectorgetXData () const
 
 InterpolatedFuzzyInterval (const base::DataVector &xData, const base::DataVector &alphaData)
 Constructor.
 
 InterpolatedFuzzyInterval (const InterpolatedFuzzyInterval &other)
 Copy constructor.
 
 ~InterpolatedFuzzyInterval () override
 Destructor.
 
- Public Member Functions inherited from sgpp::optimization::FuzzyIntervalViaMembershipFunction
double evaluateConfidenceIntervalLowerBound (double alpha) const override
 Evaluate the lower bound of a confidence interval, which is always a closed interval \((\tilde{x})_\alpha = [a, b]\).
 
double evaluateConfidenceIntervalUpperBound (double alpha) const override
 Evaluate the upper bound of a confidence interval, which is always a closed interval \((\tilde{x})_\alpha = [a, b]\).
 
 FuzzyIntervalViaMembershipFunction (const FuzzyIntervalViaMembershipFunction &other)
 Copy constructor.
 
 FuzzyIntervalViaMembershipFunction (double supportLowerBound, double supportUpperBound, double coreLowerBound, double coreUpperBound, size_t numberOfIntegralSamples=DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES, double binarySearchTolerance=DEFAULT_BINARY_SEARCH_TOLERANCE)
 Constructor.
 
double getBinarySearchTolerance () const
 
double getCoreLowerBound () const
 
double getCoreUpperBound () const
 
void setBinarySearchTolerance (double binarySearchTolerance)
 
 ~FuzzyIntervalViaMembershipFunction () override
 Destructor.
 
- Public Member Functions inherited from sgpp::optimization::FuzzyInterval
double computeL1Error (const FuzzyInterval &other, NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute absolute L1 error to other fuzzy interval.
 
double computeL1Norm (NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute L1 norm of fuzzy interval.
 
double computeL2Error (const FuzzyInterval &other, NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute absolute L2 error to other fuzzy interval.
 
double computeL2Norm (NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute L2 norm of fuzzy interval.
 
double computeLinfError (const FuzzyInterval &other, NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute absolute Linf error to other fuzzy interval.
 
double computeLinfNorm (NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute Linf norm of fuzzy interval.
 
double computeRelativeL1Error (const FuzzyInterval &other, NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute relative L1 error to other fuzzy interval.
 
double computeRelativeL2Error (const FuzzyInterval &other, NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute relative L2 error to other fuzzy interval.
 
double computeRelativeLinfError (const FuzzyInterval &other, NormMode normMode=NormMode::ViaMembershipFunction) const
 Compute relative Linf error to other fuzzy interval.
 
 FuzzyInterval (const FuzzyInterval &other)
 Copy constructor.
 
 FuzzyInterval (double supportLowerBound, double supportUpperBound, size_t numberOfIntegralSamples=DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES)
 Constructor.
 
size_t getNumberOfIntegralSamples () const
 
double getSupportLowerBound () const
 
double getSupportUpperBound () const
 
void setNumberOfIntegralSamples (size_t numberOfIntegralSamples)
 
virtual ~FuzzyInterval ()
 Destructor.
 

Static Public Member Functions

static double getCoreLowerBound (const base::DataVector &xData, const base::DataVector &alphaData)
 Compute the lower bound of the core (i.e., the area where the membership function equals 1).
 
static double getCoreUpperBound (const base::DataVector &xData, const base::DataVector &alphaData)
 Compute the upper bound of the core (i.e., the area where the membership function equals 1).
 
static InterpolatedFuzzyIntervaltryDowncast (FuzzyInterval &fuzzyInterval)
 Try to cast a FuzzyInterval to an InterpolatedFuzzyInterval (dynamic_cast), needed for the Python interface.
 

Protected Attributes

base::DataVector alphaData
 \(\alpha\) data of sample points
 
base::DataVector xData
 \(x\) data of sample points
 
- Protected Attributes inherited from sgpp::optimization::FuzzyIntervalViaMembershipFunction
double binarySearchTolerance
 tolerance for the binary search
 
double coreLowerBound
 lower bound of the core
 
double coreUpperBound
 upper bound of the core
 
- Protected Attributes inherited from sgpp::optimization::FuzzyInterval
size_t numberOfIntegralSamples
 number of samples to compute norms
 
double supportLowerBound
 lower bound of the support
 
double supportUpperBound
 upper bound of the support
 

Additional Inherited Members

- Public Types inherited from sgpp::optimization::FuzzyInterval
enum class  NormMode { ViaMembershipFunction , ViaConfidenceInterval }
 mode to determine norms of the fuzzy interval More...
 
- Static Public Attributes inherited from sgpp::optimization::FuzzyIntervalViaMembershipFunction
static constexpr double DEFAULT_BINARY_SEARCH_TOLERANCE = 1e-6
 default tolerance for the binary search
 
- Static Public Attributes inherited from sgpp::optimization::FuzzyInterval
static const size_t DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES = 10000
 default number of samples to compute norms
 

Detailed Description

Fuzzy interval by piecewise linear interpolation of sample points \((x_i, \alpha_i)\) of the membership function \(\mu_{\tilde{x}}\), i.e., \(\mu_{\tilde{x}}(x_i) = \alpha_i\) ( \(i = 1, \dotsc, n\)).

The data must fulfill the following:

  • \(x_i < x_{i+1}\) for \(i = 1, \dotsc, n-1\)
  • \(\alpha_1 = 0 = \alpha_n\)
  • There are some \(1 < j \le k < n\) such that:
    • \(\alpha_i = 1\) for \(i = j, \dotsc, k\)
    • \(\alpha_i < \alpha_{i+1}\) for \(i = 1, \dotsc, j-1\)
    • \(\alpha_i > \alpha_{i+1}\) for \(i = k, \dotsc, n-1\)

Constructor & Destructor Documentation

◆ InterpolatedFuzzyInterval() [1/2]

sgpp::optimization::InterpolatedFuzzyInterval::InterpolatedFuzzyInterval ( const base::DataVector xData,
const base::DataVector alphaData 
)

Constructor.

Parameters
xData\(x\) data of sample points
alphaData\(\alpha\) data of sample points

◆ InterpolatedFuzzyInterval() [2/2]

sgpp::optimization::InterpolatedFuzzyInterval::InterpolatedFuzzyInterval ( const InterpolatedFuzzyInterval other)

Copy constructor.

Parameters
otherother interpolated fuzzy interval

◆ ~InterpolatedFuzzyInterval()

sgpp::optimization::InterpolatedFuzzyInterval::~InterpolatedFuzzyInterval ( )
override

Destructor.

Member Function Documentation

◆ evaluateMembershipFunction()

double sgpp::optimization::InterpolatedFuzzyInterval::evaluateMembershipFunction ( double  x) const
overridevirtual

Evaluate the membership function.

Parameters
x\(x \in X\)
Returns
\(\mu_{\tilde{x}}(x) \in [0, 1]\)

Implements sgpp::optimization::FuzzyInterval.

References alphaData, sgpp::base::DataVector::getSize(), sgpp::optimization::FuzzyInterval::supportLowerBound, sgpp::optimization::FuzzyInterval::supportUpperBound, and xData.

◆ getAlphaData()

const base::DataVector & sgpp::optimization::InterpolatedFuzzyInterval::getAlphaData ( ) const
Returns
\(\alpha\) data of sample points

References alphaData.

◆ getCoreLowerBound()

double sgpp::optimization::InterpolatedFuzzyInterval::getCoreLowerBound ( const base::DataVector xData,
const base::DataVector alphaData 
)
static

Compute the lower bound of the core (i.e., the area where the membership function equals 1).

Parameters
xData\(x\) data of sample points
alphaData\(\alpha\) data of sample points

References alphaData, sgpp::base::DataVector::getSize(), and xData.

◆ getCoreUpperBound()

double sgpp::optimization::InterpolatedFuzzyInterval::getCoreUpperBound ( const base::DataVector xData,
const base::DataVector alphaData 
)
static

Compute the upper bound of the core (i.e., the area where the membership function equals 1).

Parameters
xData\(x\) data of sample points
alphaData\(\alpha\) data of sample points

References alphaData, sgpp::base::DataVector::getSize(), and xData.

◆ getXData()

const base::DataVector & sgpp::optimization::InterpolatedFuzzyInterval::getXData ( ) const
Returns
\(x\) data of sample points

References xData.

◆ tryDowncast()

InterpolatedFuzzyInterval * sgpp::optimization::InterpolatedFuzzyInterval::tryDowncast ( FuzzyInterval fuzzyInterval)
static

Try to cast a FuzzyInterval to an InterpolatedFuzzyInterval (dynamic_cast), needed for the Python interface.

Parameters
fuzzyIntervalFuzzyInterval to cast
Returns
pointer to InterpolatedFuzzyInterval if succesful, nullptr otherwise

Member Data Documentation

◆ alphaData

base::DataVector sgpp::optimization::InterpolatedFuzzyInterval::alphaData
protected

\(\alpha\) data of sample points

Referenced by evaluateMembershipFunction(), getAlphaData(), getCoreLowerBound(), and getCoreUpperBound().

◆ xData

base::DataVector sgpp::optimization::InterpolatedFuzzyInterval::xData
protected

\(x\) data of sample points

Referenced by evaluateMembershipFunction(), getCoreLowerBound(), getCoreUpperBound(), and getXData().


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