template<class T>
class RWInterval< T >
RWInterval is a general-purpose class for describing an interval of values. The values in the interval are of type T
. An interval may be considered a set of contiguous values where the interval endpoints are either included or excluded from the set. If an interval's endpoints are excluded, it is said to be open; if the endpoints are included, the interval is said to be closed.
In Linear Algebra Module, the class RWInterval is used to describe confidence intervals for regression predictions and parameter estimates.
- Synopsis
#include <rw/analytics/interval.h>
A class template for describing an interval of values.
Definition interval.h:80
- Example
The following example prints the linear regression prediction interval for the first pattern in the predictor matrix at a confidence level of 99 percent.
#include <rw/analytics/interval.h>
#include <rw/analytics/linregress.h>
int main() {
"5x2 [1.2 2.1 8 7 3 3.2 6.4 4.6 2 2.3]";
lr.predictionInterval(firstPredPattern, 0.01);
cout <<
"Interval lower bound: " << interval.
lowerBound() << endl;
cout <<
"Interval upper bound: " << interval.
upperBound() << endl;
return 0;
}
A templatized general matrix class.
Definition genmat.h:741
T lowerBound() const
Definition interval.h:141
T upperBound() const
Definition interval.h:146
Constructs a linear regression model from a matrix of predictor variable data and a vector of observa...
Definition linregress.h:96
A templatized vector class.
Definition mathvec.h:667