SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::optimization::FuzzyInterval Class Referenceabstract

Abstract class for a fuzzy interval. More...

#include <FuzzyInterval.hpp>

Inheritance diagram for sgpp::optimization::FuzzyInterval:
sgpp::optimization::FuzzyIntervalViaConfidenceInterval sgpp::optimization::FuzzyIntervalViaMembershipFunction sgpp::optimization::TriangularFuzzyInterval sgpp::optimization::InterpolatedFuzzyInterval sgpp::optimization::QuasiGaussianFuzzyNumber

Public Types

enum class  NormMode { ViaMembershipFunction , ViaConfidenceInterval }
 mode to determine norms of the fuzzy interval More...
 

Public Member Functions

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.
 
virtual double evaluateConfidenceIntervalLowerBound (double alpha) const =0
 Pure virtual method to evaluate the lower bound of a confidence interval, which is always a closed interval \((\tilde{x})_\alpha = [a, b]\).
 
virtual double evaluateConfidenceIntervalUpperBound (double alpha) const =0
 Pure virtual method to evaluate the upper bound of a confidence interval, which is always a closed interval \((\tilde{x})_\alpha = [a, b]\).
 
virtual double evaluateMembershipFunction (double x) const =0
 Pure virtual method to evaluate the membership function.
 
 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 Attributes

static const size_t DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES = 10000
 default number of samples to compute norms
 

Protected Attributes

size_t numberOfIntegralSamples
 number of samples to compute norms
 
double supportLowerBound
 lower bound of the support
 
double supportUpperBound
 upper bound of the support
 

Detailed Description

Abstract class for a fuzzy interval.

A fuzzy set is the graph \(\tilde{x} = \{(x, \mu_{\tilde{x}}(x)) \mid x \in X\}\) of some function \(\mu_{\tilde{x}}\colon X \to [0, 1]\) (membership function), where usually \(X = [0, 1]\) (since we are working on sparse grids here). A fuzzy interval is convex if \(\min(\mu_{\tilde{x}}(a), \mu_{\tilde{x}}(c)) \le \mu_{\tilde{x}}(b)\) for all \(a, b, c \in X\) with \(a \le b \le c\). A fuzzy interval is normalized if \(\max \mu_{\tilde{x}} = 1\). A fuzzy interval is a convex and normalized fuzzy set with piecewise continuous membership function.

For some given \(\alpha \in [0, 1]\), the confidence interval of level \(\alpha\) or the \(\alpha\)-cut is defined as \((\tilde{x})_\alpha = \{x \in X \mid \mu_{\tilde{x}}(x) \ge \alpha\}\) for \(\alpha > 0\) and \((\tilde{x})_\alpha = \mathrm{supp}(\mu_{\tilde{x}})\) for \(\alpha = 0\). The confidence intervals of fuzzy intervals are always nested closed intervals, i.e., \((\tilde{x})_\alpha = [a, b]\) for some \(a \le b\) and \((\tilde{x})_{\alpha_1} \supset (\tilde{x})_{\alpha_2}\) for \(\alpha_1 \le \alpha_2\).

Member Enumeration Documentation

◆ NormMode

mode to determine norms of the fuzzy interval

Enumerator
ViaMembershipFunction 

determine norm of membership function

ViaConfidenceInterval 

determine norm of size of confidence interval

Constructor & Destructor Documentation

◆ FuzzyInterval() [1/2]

sgpp::optimization::FuzzyInterval::FuzzyInterval ( double  supportLowerBound,
double  supportUpperBound,
size_t  numberOfIntegralSamples = DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES 
)

Constructor.

Needs the support of the fuzzy interval (which is always a closed interval, so it suffices to supply lower and upper bound).

Parameters
supportLowerBoundlower bound of the support
supportUpperBoundupper bound of the support
numberOfIntegralSamplesnumber of samples to compute norms

◆ FuzzyInterval() [2/2]

sgpp::optimization::FuzzyInterval::FuzzyInterval ( const FuzzyInterval other)

Copy constructor.

Parameters
otherother fuzzy interval

◆ ~FuzzyInterval()

sgpp::optimization::FuzzyInterval::~FuzzyInterval ( )
virtual

Destructor.

Member Function Documentation

◆ computeL1Error()

double sgpp::optimization::FuzzyInterval::computeL1Error ( const FuzzyInterval other,
NormMode  normMode = NormMode::ViaMembershipFunction 
) const

Compute absolute L1 error to other fuzzy interval.

Parameters
otherother fuzzy interval
normModemode with which to compute the norms
Returns
absolute L1 error

References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.

Referenced by computeRelativeL1Error().

◆ computeL1Norm()

double sgpp::optimization::FuzzyInterval::computeL1Norm ( NormMode  normMode = NormMode::ViaMembershipFunction) const

◆ computeL2Error()

double sgpp::optimization::FuzzyInterval::computeL2Error ( const FuzzyInterval other,
NormMode  normMode = NormMode::ViaMembershipFunction 
) const

Compute absolute L2 error to other fuzzy interval.

Parameters
otherother fuzzy interval
normModemode with which to compute the norms
Returns
absolute L2 error

References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.

Referenced by computeRelativeL2Error().

◆ computeL2Norm()

double sgpp::optimization::FuzzyInterval::computeL2Norm ( NormMode  normMode = NormMode::ViaMembershipFunction) const

◆ computeLinfError()

double sgpp::optimization::FuzzyInterval::computeLinfError ( const FuzzyInterval other,
NormMode  normMode = NormMode::ViaMembershipFunction 
) const

Compute absolute Linf error to other fuzzy interval.

Parameters
otherother fuzzy interval
normModemode with which to compute the norms
Returns
absolute Linf error

References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.

Referenced by computeRelativeLinfError().

◆ computeLinfNorm()

double sgpp::optimization::FuzzyInterval::computeLinfNorm ( NormMode  normMode = NormMode::ViaMembershipFunction) const

◆ computeRelativeL1Error()

double sgpp::optimization::FuzzyInterval::computeRelativeL1Error ( const FuzzyInterval other,
NormMode  normMode = NormMode::ViaMembershipFunction 
) const

Compute relative L1 error to other fuzzy interval.

Parameters
otherother fuzzy interval
normModemode with which to compute the norms
Returns
relative L1 error

References computeL1Error(), and computeL1Norm().

◆ computeRelativeL2Error()

double sgpp::optimization::FuzzyInterval::computeRelativeL2Error ( const FuzzyInterval other,
NormMode  normMode = NormMode::ViaMembershipFunction 
) const

Compute relative L2 error to other fuzzy interval.

Parameters
otherother fuzzy interval
normModemode with which to compute the norms
Returns
relative L2 error

References computeL2Error(), and computeL2Norm().

◆ computeRelativeLinfError()

double sgpp::optimization::FuzzyInterval::computeRelativeLinfError ( const FuzzyInterval other,
NormMode  normMode = NormMode::ViaMembershipFunction 
) const

Compute relative Linf error to other fuzzy interval.

Parameters
otherother fuzzy interval
normModemode with which to compute the norms
Returns
relative Linf error

References computeLinfError(), and computeLinfNorm().

◆ evaluateConfidenceIntervalLowerBound()

virtual double sgpp::optimization::FuzzyInterval::evaluateConfidenceIntervalLowerBound ( double  alpha) const
pure virtual

Pure virtual method to evaluate the lower bound of a confidence interval, which is always a closed interval \((\tilde{x})_\alpha = [a, b]\).

Parameters
alpha\(\alpha \in [0, 1]\)
Returns
\(a \in X\)

Implemented in sgpp::optimization::FuzzyIntervalViaMembershipFunction, and sgpp::optimization::TriangularFuzzyInterval.

Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), computeLinfNorm(), and sgpp::optimization::FuzzyIntervalViaConfidenceInterval::evaluateMembershipFunction().

◆ evaluateConfidenceIntervalUpperBound()

virtual double sgpp::optimization::FuzzyInterval::evaluateConfidenceIntervalUpperBound ( double  alpha) const
pure virtual

Pure virtual method to evaluate the upper bound of a confidence interval, which is always a closed interval \((\tilde{x})_\alpha = [a, b]\).

Parameters
alpha\(\alpha \in [0, 1]\)
Returns
\(b \in X\)

Implemented in sgpp::optimization::FuzzyIntervalViaMembershipFunction, and sgpp::optimization::TriangularFuzzyInterval.

Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), computeLinfNorm(), and sgpp::optimization::FuzzyIntervalViaConfidenceInterval::evaluateMembershipFunction().

◆ evaluateMembershipFunction()

◆ getNumberOfIntegralSamples()

size_t sgpp::optimization::FuzzyInterval::getNumberOfIntegralSamples ( ) const
Returns
number of samples to compute norms

References numberOfIntegralSamples.

◆ getSupportLowerBound()

double sgpp::optimization::FuzzyInterval::getSupportLowerBound ( ) const
Returns
lower bound of the support

References supportLowerBound.

Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), and computeLinfNorm().

◆ getSupportUpperBound()

double sgpp::optimization::FuzzyInterval::getSupportUpperBound ( ) const
Returns
upper bound of the support

References supportUpperBound.

Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), and computeLinfNorm().

◆ setNumberOfIntegralSamples()

void sgpp::optimization::FuzzyInterval::setNumberOfIntegralSamples ( size_t  numberOfIntegralSamples)
Parameters
numberOfIntegralSamplesnumber of samples to compute norms

References numberOfIntegralSamples.

Member Data Documentation

◆ DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES

const size_t sgpp::optimization::FuzzyInterval::DEFAULT_NUMBER_OF_INTEGRAL_SAMPLES = 10000
static

default number of samples to compute norms

◆ numberOfIntegralSamples

size_t sgpp::optimization::FuzzyInterval::numberOfIntegralSamples
protected

◆ supportLowerBound

◆ supportUpperBound


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