Java Reference
In-Depth Information
layout is filled with information on the selected attribute's statistics.
We will focus on the methods of this class that retrieve information
before displaying it. Three types of statistical information can
be retrieved. Numerical attributes have statistics such as the
minimum, maximum, and quantile information. Discrete attri-
butes have statistics such as the frequency of attribute categories.
Continuous attributes have statistics based on a segmentation of
the values into bands described with their sum, frequency, and
average.
The
DescriptiveStatisticsDisplayer
has several member variables to
hold the graphical components and other member variables to hold
the statistical information retrieved from the
PhysicalDataSet
. The
main variables are:
•
AttributeStatisticsSet mAttributeStatisticsSet
is the set of sta-
tistics used to initialize the variable
mStatistics.
•
Collection mStatistics
contains all retrieved statistics for all
attributes.
•
ContinuousStatistics mSelectedContinuousStatistics
is the con-
tinuous statistics associated with the selected attribute.
•
NumericalStatistics mSelectedNumericalStatistics
is the num-
erical statistics associated with the selected attribute.
•
DiscreteStatistics mSelectedDiscreteStatistics
is the discrete
statistics associated with the selected attribute.
When a
DescriptiveStatisticsDisplayer
object is created, the following
code is executed:
1. public DescriptiveStatisticDisplayer(PhysicalDataSet iPhysicalDataSet) {
2.
try {
3.
mAttributeStatisticsSet
4.
iPhysicalDataSet.getAttributeStatistics();
5.
} catch (JDMException lException) {
6.
JOptionPane.showMessageDialog(
7.
this,
8.
lException.getMessage(),
9.
"JDMException",
10.
JOptionPane.WARNING_MESSAGE);
11.
lException.printStackTrace();
12.
return;
13.
}
14.
try {
Search WWH ::
Custom Search