QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
QwtBoxStatisticsCalculator类 参考

Helper class for computing boxplot statistics from raw data 更多...

#include <qwt_box_statistics.h>

Public 类型

enum  WhiskerMethod {
  Tukey , Percentile , MinMax , StandardDeviation ,
  StandardError
}
 Whisker calculation method 更多...
 

Public 成员函数

 QwtBoxStatisticsCalculator ()
 Constructor with default Tukey method
 
void setWhiskerMethod (WhiskerMethod method)
 Set whisker calculation method
 
WhiskerMethod whiskerMethod () const
 Get whisker calculation method
 
void setWhiskerCoefficient (double coeff)
 Set whisker coefficient (1.5 for Tukey, percentile for Percentile method)
 
double whiskerCoefficient () const
 Get whisker coefficient
 

静态 Public 成员函数

static QwtBoxSample calculate (double position, const QVector< double > &sortedData, WhiskerMethod method=Tukey, double coefficient=1.5)
 Compute QwtBoxSample from sorted data
 
static QwtBoxSample calculateFromRaw (double position, const QVector< double > &rawData, WhiskerMethod method=Tukey, double coefficient=1.5)
 Compute QwtBoxSample from unsorted data (sorts internally)
 
static QVector< double > extractOutliers (const QwtBoxSample &sample, const QVector< double > &sortedData)
 Extract outliers given box sample and sorted data
 
static void calculateFull (double position, const QVector< double > &rawData, QwtBoxSample &sample, QwtBoxOutlierSample &outliers, WhiskerMethod method=Tukey, double coefficient=1.5)
 Compute full statistics (sample + outliers) in one call
 

详细描述

Helper class for computing boxplot statistics from raw data

Provides static methods to calculate whisker bounds, quartiles, median, and extract outliers using various methods (Tukey, percentile, SD, SE).

成员枚举类型说明

◆ WhiskerMethod

Whisker calculation method

枚举值
Tukey 

Tukey's method: whiskers extend to 1.5×IQR from Q1/Q3 (default)

Percentile 

Percentile method: whiskers at specified percentile range

MinMax 

Min/Max method: whiskers at actual data min/max

StandardDeviation 

Standard deviation method: whiskers at mean ± coeff×SD

StandardError 

Standard error method: whiskers at mean ± coeff×SE

构造及析构函数说明

◆ QwtBoxStatisticsCalculator()

QwtBoxStatisticsCalculator::QwtBoxStatisticsCalculator ( )

Constructor with default Tukey method

Initializes the calculator with Tukey whisker method and coefficient 1.5.

成员函数说明

◆ calculate()

QwtBoxSample QwtBoxStatisticsCalculator::calculate ( double  position,
const QVector< double > &  sortedData,
WhiskerMethod  method = Tukey,
double  coefficient = 1.5 
)
static

Compute QwtBoxSample from sorted data

Compute boxplot statistics from sorted data

Calculates whisker bounds, quartiles, median, and outlier count using the specified whisker method.

参数
[in]positionThe position value for the resulting sample
[in]sortedDataPre-sorted data vector
[in]methodWhisker calculation method (default: Tukey)
[in]coefficientWhisker coefficient (default: 1.5)
返回
QwtBoxSample containing computed statistics

◆ calculateFromRaw()

QwtBoxSample QwtBoxStatisticsCalculator::calculateFromRaw ( double  position,
const QVector< double > &  rawData,
WhiskerMethod  method = Tukey,
double  coefficient = 1.5 
)
static

Compute QwtBoxSample from unsorted data (sorts internally)

Compute boxplot statistics from unsorted raw data

Sorts the data internally and then calculates statistics.

参数
[in]positionThe position value for the resulting sample
[in]rawDataUnsorted raw data vector
[in]methodWhisker calculation method (default: Tukey)
[in]coefficientWhisker coefficient (default: 1.5)
返回
QwtBoxSample containing computed statistics

◆ calculateFull()

void QwtBoxStatisticsCalculator::calculateFull ( double  position,
const QVector< double > &  rawData,
QwtBoxSample sample,
QwtBoxOutlierSample outliers,
WhiskerMethod  method = Tukey,
double  coefficient = 1.5 
)
static

Compute full statistics (sample + outliers) in one call

Compute full boxplot statistics including outliers

Calculates both the box sample and extracts outlier values in one call.

参数
[in]positionThe position value for the resulting samples
[in]rawDataUnsorted raw data vector
[out]sampleOutput parameter for computed box statistics
[out]outliersOutput parameter for extracted outlier values
[in]methodWhisker calculation method (default: Tukey)
[in]coefficientWhisker coefficient (default: 1.5)

◆ extractOutliers()

QVector< double > QwtBoxStatisticsCalculator::extractOutliers ( const QwtBoxSample sample,
const QVector< double > &  sortedData 
)
static

Extract outliers given box sample and sorted data

Extract outlier values from sorted data based on box sample

Identifies all values outside the whisker bounds as outliers.

参数
[in]sampleThe box sample containing whisker bounds
[in]sortedDataPre-sorted data vector
返回
Vector of outlier values

◆ setWhiskerCoefficient()

void QwtBoxStatisticsCalculator::setWhiskerCoefficient ( double  coeff)

Set whisker coefficient (1.5 for Tukey, percentile for Percentile method)

Set the whisker coefficient

参数
[in]coeffCoefficient value (1.5 for Tukey method, percentile value for Percentile method)

◆ setWhiskerMethod()

void QwtBoxStatisticsCalculator::setWhiskerMethod ( WhiskerMethod  method)

Set whisker calculation method

Set the whisker calculation method

参数
[in]methodThe whisker method to use (Tukey, Percentile, MinMax, StandardDeviation, StandardError)

◆ whiskerCoefficient()

double QwtBoxStatisticsCalculator::whiskerCoefficient ( ) const

Get whisker coefficient

Get the whisker coefficient

返回
Current whisker coefficient

◆ whiskerMethod()

QwtBoxStatisticsCalculator::WhiskerMethod QwtBoxStatisticsCalculator::whiskerMethod ( ) const

Get whisker calculation method

Get the whisker calculation method

返回
Current whisker method

该类的文档由以下文件生成: