![]() |
SG++-Doxygen-Documentation
|
Abstract class for a fuzzy interval. More...
#include <FuzzyInterval.hpp>
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 | |
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\).
|
strong |
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).
supportLowerBound | lower bound of the support |
supportUpperBound | upper bound of the support |
numberOfIntegralSamples | number of samples to compute norms |
sgpp::optimization::FuzzyInterval::FuzzyInterval | ( | const FuzzyInterval & | other | ) |
Copy constructor.
other | other fuzzy interval |
|
virtual |
Destructor.
double sgpp::optimization::FuzzyInterval::computeL1Error | ( | const FuzzyInterval & | other, |
NormMode | normMode = NormMode::ViaMembershipFunction |
||
) | const |
Compute absolute L1 error to other fuzzy interval.
other | other fuzzy interval |
normMode | mode with which to compute the norms |
References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.
Referenced by computeRelativeL1Error().
double sgpp::optimization::FuzzyInterval::computeL1Norm | ( | NormMode | normMode = NormMode::ViaMembershipFunction | ) | const |
Compute L1 norm of fuzzy interval.
normMode | mode with which to compute the norm |
References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), mu, numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.
Referenced by computeRelativeL1Error().
double sgpp::optimization::FuzzyInterval::computeL2Error | ( | const FuzzyInterval & | other, |
NormMode | normMode = NormMode::ViaMembershipFunction |
||
) | const |
Compute absolute L2 error to other fuzzy interval.
other | other fuzzy interval |
normMode | mode with which to compute the norms |
References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.
Referenced by computeRelativeL2Error().
double sgpp::optimization::FuzzyInterval::computeL2Norm | ( | NormMode | normMode = NormMode::ViaMembershipFunction | ) | const |
Compute L2 norm of fuzzy interval.
normMode | mode with which to compute the norm |
References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), mu, numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.
Referenced by computeRelativeL2Error().
double sgpp::optimization::FuzzyInterval::computeLinfError | ( | const FuzzyInterval & | other, |
NormMode | normMode = NormMode::ViaMembershipFunction |
||
) | const |
Compute absolute Linf error to other fuzzy interval.
other | other fuzzy interval |
normMode | mode with which to compute the norms |
References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.
Referenced by computeRelativeLinfError().
double sgpp::optimization::FuzzyInterval::computeLinfNorm | ( | NormMode | normMode = NormMode::ViaMembershipFunction | ) | const |
Compute Linf norm of fuzzy interval.
normMode | mode with which to compute the norm |
References alpha, evaluateConfidenceIntervalLowerBound(), evaluateConfidenceIntervalUpperBound(), evaluateMembershipFunction(), getSupportLowerBound(), getSupportUpperBound(), mu, numberOfIntegralSamples, ViaConfidenceInterval, and ViaMembershipFunction.
Referenced by computeRelativeLinfError().
double sgpp::optimization::FuzzyInterval::computeRelativeL1Error | ( | const FuzzyInterval & | other, |
NormMode | normMode = NormMode::ViaMembershipFunction |
||
) | const |
Compute relative L1 error to other fuzzy interval.
other | other fuzzy interval |
normMode | mode with which to compute the norms |
References computeL1Error(), and computeL1Norm().
double sgpp::optimization::FuzzyInterval::computeRelativeL2Error | ( | const FuzzyInterval & | other, |
NormMode | normMode = NormMode::ViaMembershipFunction |
||
) | const |
Compute relative L2 error to other fuzzy interval.
other | other fuzzy interval |
normMode | mode with which to compute the norms |
References computeL2Error(), and computeL2Norm().
double sgpp::optimization::FuzzyInterval::computeRelativeLinfError | ( | const FuzzyInterval & | other, |
NormMode | normMode = NormMode::ViaMembershipFunction |
||
) | const |
Compute relative Linf error to other fuzzy interval.
other | other fuzzy interval |
normMode | mode with which to compute the norms |
References computeLinfError(), and computeLinfNorm().
|
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]\).
alpha | \(\alpha \in [0, 1]\) |
Implemented in sgpp::optimization::FuzzyIntervalViaMembershipFunction, and sgpp::optimization::TriangularFuzzyInterval.
Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), computeLinfNorm(), and sgpp::optimization::FuzzyIntervalViaConfidenceInterval::evaluateMembershipFunction().
|
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]\).
alpha | \(\alpha \in [0, 1]\) |
Implemented in sgpp::optimization::FuzzyIntervalViaMembershipFunction, and sgpp::optimization::TriangularFuzzyInterval.
Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), computeLinfNorm(), and sgpp::optimization::FuzzyIntervalViaConfidenceInterval::evaluateMembershipFunction().
|
pure virtual |
Pure virtual method to evaluate the membership function.
x | \(x \in X\) |
Implemented in sgpp::optimization::FuzzyIntervalViaConfidenceInterval, sgpp::optimization::InterpolatedFuzzyInterval, sgpp::optimization::QuasiGaussianFuzzyNumber, and sgpp::optimization::TriangularFuzzyInterval.
Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), computeLinfNorm(), sgpp::optimization::FuzzyIntervalViaMembershipFunction::evaluateConfidenceIntervalLowerBound(), and sgpp::optimization::FuzzyIntervalViaMembershipFunction::evaluateConfidenceIntervalUpperBound().
size_t sgpp::optimization::FuzzyInterval::getNumberOfIntegralSamples | ( | ) | const |
References numberOfIntegralSamples.
double sgpp::optimization::FuzzyInterval::getSupportLowerBound | ( | ) | const |
References supportLowerBound.
Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), and computeLinfNorm().
double sgpp::optimization::FuzzyInterval::getSupportUpperBound | ( | ) | const |
References supportUpperBound.
Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), and computeLinfNorm().
void sgpp::optimization::FuzzyInterval::setNumberOfIntegralSamples | ( | size_t | numberOfIntegralSamples | ) |
numberOfIntegralSamples | number of samples to compute norms |
References numberOfIntegralSamples.
|
static |
default number of samples to compute norms
|
protected |
number of samples to compute norms
Referenced by computeL1Error(), computeL1Norm(), computeL2Error(), computeL2Norm(), computeLinfError(), computeLinfNorm(), getNumberOfIntegralSamples(), and setNumberOfIntegralSamples().
|
protected |
lower bound of the support
Referenced by sgpp::optimization::FuzzyIntervalViaMembershipFunction::evaluateConfidenceIntervalLowerBound(), sgpp::optimization::FuzzyIntervalViaConfidenceInterval::evaluateMembershipFunction(), sgpp::optimization::InterpolatedFuzzyInterval::evaluateMembershipFunction(), sgpp::optimization::QuasiGaussianFuzzyNumber::evaluateMembershipFunction(), and getSupportLowerBound().
|
protected |
upper bound of the support
Referenced by sgpp::optimization::FuzzyIntervalViaMembershipFunction::evaluateConfidenceIntervalUpperBound(), sgpp::optimization::FuzzyIntervalViaConfidenceInterval::evaluateMembershipFunction(), sgpp::optimization::InterpolatedFuzzyInterval::evaluateMembershipFunction(), sgpp::optimization::QuasiGaussianFuzzyNumber::evaluateMembershipFunction(), and getSupportUpperBound().