bugfixes to documentation

This commit is contained in:
jkriege2 2019-06-13 12:46:49 +02:00
parent 2b5a30a668
commit baab796541
6 changed files with 39 additions and 29 deletions

View File

@ -61,6 +61,8 @@ This dataset can be visualized with a simple scatter plot:
gScatterForBar->setSymbolColor(QColorWithAlphaF(QColor("red"), 0.5));
```
The resulting plot looks like this:
![jkqtplotter_simpletest_datastore_groupedstat_barchartrawdata](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_datastore_groupedstat_barchartrawdata.png)
## Calculating Grouped Statistics for a Barchart
@ -94,6 +96,8 @@ Finally the calculated groups are drawn:
gBar->setYErrorColumn(static_cast<int>(colBarStdDev));
```
The resulting plot looks like this:
![jkqtplotter_simpletest_datastore_groupedstat_barchart](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_datastore_groupedstat_barchart.png)
In order to safe yo the typing of the code above, shortcuts in the form of adaptors exist:
@ -140,6 +144,8 @@ The result can be plotted using JKQTPBoxplotVerticalGraph, which receives a colu
gBoxplot->setPercentile75Column(colBarQ75);
```
The resulting plot looks like this:
![jkqtplotter_simpletest_datastore_groupedstat_boxplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_datastore_groupedstat_boxplot.png)
In order to safe yo the typing of the code above, shortcuts in the form of adaptors exist:
@ -184,6 +190,8 @@ This dataset can be visualized:
gScatterRaw->setSymbolSize(5);
```
The resulting plot looks like this:
![jkqtplotter_simpletest_datastore_groupedstat_scatterrawdata](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_datastore_groupedstat_scatterrawdata.png)
## Calculating x- and y-Errors from Categorized Data
@ -230,6 +238,8 @@ Finally the calculated groups are drawn
gScatterErr->setDrawLine(false);
```
The resulting plot looks like this:
![jkqtplotter_simpletest_datastore_groupedstat_scatter](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_datastore_groupedstat_scatter.png)

View File

@ -446,7 +446,7 @@ inline size_t jkqtpstatFilterGoodFloat(InputIt first, InputIt last, OutputIt out
/*! \brief calculates the variance of a given data range \a first ... \a last
/*! \brief calculates the variance \f$ \sigma_X^2=\mbox{Var}(X) \f$ of a given data range \a first ... \a last
\ingroup jkqtptools_math_statistics_basic
\tparam InputIt standard iterator type of \a first and \a last.
@ -459,7 +459,7 @@ inline size_t jkqtpstatFilterGoodFloat(InputIt first, InputIt last, OutputIt out
If the given range \a first ... \a last is empty, 0 is returned
This function implements:
\f[ \sigma_X=\text{Var}(X)=\frac{1}{N-1}\cdot\sum\limits_{i=1}^{N}(X_i-\overline{X})^2=\frac{1}{N-1}\cdot\left(\sum_{i=1}^NX_i^2-\frac{1}{N}\cdot\left(\sum_{i=1}^NX_i\right)^2\right) \f]
\f[ \sigma_X^2=\text{Var}(X)=\frac{1}{N-1}\cdot\sum\limits_{i=1}^{N}(X_i-\overline{X})^2=\frac{1}{N-1}\cdot\left(\sum_{i=1}^NX_i^2-\frac{1}{N}\cdot\left(\sum_{i=1}^NX_i\right)^2\right) \f]
\note Each value is the specified range is converted to a double using jkqtp_todouble().
Entries in the range that are invalid double (using JKQTPIsOKFloat() )
@ -489,7 +489,7 @@ inline double jkqtpstatVariance(InputIt first, InputIt last, double* averageOut=
/*! \brief calculates the variance of a given data range \a first ... \a last
/*! \brief calculates the standard deviation \f$ \sigma_X=\sqrt{\mbox{Var}(X)} \f$ of a given data range \a first ... \a last
\ingroup jkqtptools_math_statistics_basic
\tparam InputIt standard iterator type of \a first and \a last.
@ -515,7 +515,7 @@ inline double jkqtpstatStdDev(InputIt first, InputIt last, double* averageOut=nu
/*! \brief calculates the weighted variance of a given data range \a first ... \a last
/*! \brief calculates the weighted variance \f$ \sigma_X^2=\mbox{Var}(X) \f$ of a given data range \a first ... \a last
\ingroup jkqtptools_math_statistics_basic
\tparam InputIt standard iterator type of \a first and \a last.
@ -529,7 +529,7 @@ inline double jkqtpstatStdDev(InputIt first, InputIt last, double* averageOut=nu
If the given range \a first ... \a last is empty, 0 is returned
This function implements:
\f[ \text{Var}(v)=\frac{\sum\limits_{i=1}^{N}w_i\cdot (v_i-\overline{v})^2}{\sum\limits_{i=1}^{N}w_i} \f]
\f[ \sigma_v^2=\text{Var}(v)=\frac{\sum\limits_{i=1}^{N}w_i\cdot (v_i-\overline{v})^2}{\sum\limits_{i=1}^{N}w_i} \f]
\note Each value is the specified range is converted to a double using jkqtp_todouble().
Entries in the range that are invalid double (using JKQTPIsOKFloat() )
@ -559,7 +559,7 @@ inline double jkqtpstatWeightedVariance(InputIt first, InputIt last, InputWeight
/*! \brief calculates the weighted standard deviation of a given data range \a first ... \a last
/*! \brief calculates the weighted standard deviation \f$ \sigma_X=\sqrt{\mbox{Var}(X)} \f$ of a given data range \a first ... \a last
\ingroup jkqtptools_math_statistics_basic
\tparam InputIt standard iterator type of \a first and \a last.
@ -587,7 +587,7 @@ inline double jkqtpstatWeightedStdDev(InputIt first, InputIt last, InputWeightIt
/*! \brief calculates the skewness of a given data range \a first ... \a last
/*! \brief calculates the skewness \f$ \gamma_1=\mathbb{E}\left[\left(\frac{X-\mu}{\sigma}\right)^3\right] \f$ of a given data range \a first ... \a last
\ingroup jkqtptools_math_statistics_basic
\tparam InputIt standard iterator type of \a first and \a last.
@ -712,7 +712,7 @@ inline double jkqtpstatMoment(InputIt first, InputIt last, int order, size_t* No
/*! \brief calculate empirical (Pearson's) correlation coefficient between two given data ranges \a first1 ... \a last1 and \a first2 ... \a last2
/*! \brief calculate empirical (Pearson's) correlation coefficient \f$ \rho_{x,y} \f$ between two given data ranges \a first1 ... \a last1 and \a first2 ... \a last2
\ingroup jkqtptools_math_statistics_basic
\tparam InputIt1 standard iterator type of \a first1 and \a last1.
@ -727,7 +727,7 @@ inline double jkqtpstatMoment(InputIt first, InputIt last, int order, size_t* No
If the given range \a first1 ... \a last1 is empty, JKQTP_DOUBLE_NAN is returned
This function implements:
\f[ \text{Kor}(x,y)=\frac{\sum\limits_{i=0}^{N-1}(x_i-\overline{x})(y_i-\overline{y})}{\sqrt{\sum\limits_{i=0}^{N-1}(x_i-\overline{x})^2\cdot\sum\limits_{i=0}^{N-1}(y_i-\overline{y})^2}} \f]
\f[ \rho_{x,y}=\text{CorCoeff}_{\text{Pearson}}(x,y)=\frac{\sum\limits_{i=0}^{N-1}(x_i-\overline{x})(y_i-\overline{y})}{\sqrt{\sum\limits_{i=0}^{N-1}(x_i-\overline{x})^2\cdot\sum\limits_{i=0}^{N-1}(y_i-\overline{y})^2}} \f]
\note Each value is the specified range is converted to a double using jkqtp_todouble().
Entries in the range that are invalid double (using JKQTPIsOKFloat() )

View File

@ -67,7 +67,7 @@ double jkqtpstatGroupingIdentity1D(double v);
\see JKQTPStatGroupDefinitionFunctor1D
*/
double jkqtpstatGroupingRound1D(double v);
/*! \brief assign each value to groups \f$ \mbox{firstGroupCenter}, \mbox{firstGroupCenter}\pm\mbox{groupWidth}/2, \mbox{firstGroupCenter}\pm2\cdot\mbox{groupWidth}/2, , \mbox{firstGroupCenter}\pm3\cdot\mbox{groupWidth}/2, ... \f$
/*! \brief assign each value to groups \f$ \mbox{firstGroupCenter} \f$ , \f$ \mbox{firstGroupCenter}\pm\mbox{groupWidth}/2\f$ , \f$ \mbox{firstGroupCenter}\pm2\cdot\mbox{groupWidth}/2 \f$ , \f$ \mbox{firstGroupCenter}\pm3\cdot\mbox{groupWidth}/2 \f$ , ...
\ingroup jkqtptools_math_statistics_grouped
This is equivalent to \f$ \mbox{round}\left(\frac{x-\mbox{firstGroupCenter}}{\mbox{groupWidth}/2}\right) \f$

View File

@ -421,7 +421,7 @@ inline void jkqtpstatKDE1D(InputIt first, InputIt last, double binXLeft, double
/*! \brief evaluates the Kernel Density Estimator (KDE) at a given position
\ingroup jkqtptools_math_statistics_1dkde
\ingroup jkqtptools_math_statistics_2dkde
evaluates \f[ \tilde{f}(x,y):=\frac{1}{N\cdot\sqrt{\text{bandwidthx}}\cdot\sqrt{\text{bandwidthy}}}\cdot\sum\limits_{i=0}^{N-1}K\left(\frac{x-x_i}{\text{bandwidthx}},\frac{y-y_i}{\text{bandwidthy}}\right) \f]

View File

@ -356,7 +356,7 @@ inline void jkqtpstatRegression(JKQTPStatRegressionModelType type, InputItX firs
/*! \brief calculate the robust linear regression coefficients for a given data range \a firstX / \a firstY ... \a lastX / \a lastY where the model is defined by \a type
So this function solves the Lp-norm optimization problem: \f[ (a^\ast, b^\ast)=\mathop{\mathrm{arg\;min}}\limits_{a,b}\sum\limits_i\left(y_i-f_{\text{type}}(x_i,a,b)\right)^p \f]
So this function solves the Lp-norm optimization problem: \f[ (a^\ast, b^\ast)=\mathop{\mathrm{arg\;min}}\limits_{a,b}\sum\limits_i|y_i-f_{\text{type}}(x_i,a,b)|^p \f]
by reducing it to a linear fit by transforming x- and/or y-data
\ingroup jkqtptools_math_statistics_regression
@ -403,7 +403,7 @@ inline void jkqtpstatRobustIRLSRegression(JKQTPStatRegressionModelType type, Inp
/*! \brief calculate the robust linear regression coefficients for a given data range \a firstX / \a firstY ... \a lastX / \a lastY where the model is defined by \a type
So this function solves the Lp-norm optimization problem: \f[ (a^\ast, b^\ast)=\mathop{\mathrm{arg\;min}}\limits_{a,b}\sum\limits_i\left(y_i-f_{\text{type}}(x_i,a,b)\right)^p \f]
So this function solves the Lp-norm optimization problem: \f[ (a^\ast, b^\ast)=\mathop{\mathrm{arg\;min}}\limits_{a,b}\sum\limits_iw_i^2\left(y_i-f_{\text{type}}(x_i,a,b)\right)^2 \f]
by reducing it to a linear fit by transforming x- and/or y-data
\ingroup jkqtptools_math_statistics_regression

View File

@ -1842,7 +1842,7 @@ inline TGraph* jkqtpstatAddYErrorGraph(JKQTBasePlotter* plotter, InputCatIt inFi
}
/*! \brief create a JKQTPXYLineErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPXYLineErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -1866,7 +1866,7 @@ inline JKQTPXYLineErrorGraph* jkqtpstatAddYErrorLineGraph(JKQTBasePlotter* plott
}
/*! \brief create a JKQTPBarVerticalErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPBarVerticalErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -1890,7 +1890,7 @@ inline JKQTPBarVerticalErrorGraph* jkqtpstatAddYErrorBarGraph(JKQTBasePlotter* p
}
/*! \brief create a JKQTPImpulsesVerticalErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPImpulsesVerticalErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -1914,7 +1914,7 @@ inline JKQTPImpulsesVerticalErrorGraph* jkqtpstatAddYErrorImpulsesGraph(JKQTBase
}
/*! \brief create a JKQTPXYParametrizedErrorScatterGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPXYParametrizedErrorScatterGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -1938,7 +1938,7 @@ inline JKQTPXYParametrizedErrorScatterGraph* jkqtpstatAddYErrorParametrizedScatt
}
/*! \brief create a JKQTPFilledCurveYErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPFilledCurveYErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -2012,7 +2012,7 @@ inline TGraph* jkqtpstatAddXErrorGraph(JKQTBasePlotter* plotter, InputCatIt inFi
}
/*! \brief create a JKQTPXYLineErrorGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPXYLineErrorGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_Y and \a inLastCat_Y
@ -2036,7 +2036,7 @@ inline JKQTPXYLineErrorGraph* jkqtpstatAddXErrorLineGraph(JKQTBasePlotter* plott
}
/*! \brief create a JKQTPBarHorizontalErrorGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPBarHorizontalErrorGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_Y and \a inLastCat_Y
@ -2060,7 +2060,7 @@ inline JKQTPBarHorizontalErrorGraph* jkqtpstatAddXErrorBarGraph(JKQTBasePlotter*
}
/*! \brief create a JKQTPImpulsesHorizontalErrorGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPImpulsesHorizontalErrorGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_Y and \a inLastCat_Y
@ -2084,7 +2084,7 @@ inline JKQTPImpulsesHorizontalErrorGraph* jkqtpstatAddXErrorImpulsesGraph(JKQTBa
}
/*! \brief create a JKQTPXYParametrizedErrorScatterGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPXYParametrizedErrorScatterGraph with x-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_Y and \a inLastCat_Y
@ -2188,7 +2188,7 @@ inline TGraph* jkqtpstatAddXYErrorGraph(JKQTBasePlotter* plotter, InputCatIt inF
}
/*! \brief create a JKQTPXYLineErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPXYLineErrorGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -2213,7 +2213,7 @@ inline JKQTPXYLineErrorGraph* jkqtpstatAddXYErrorLineGraph(JKQTBasePlotter* plot
/*! \brief create a JKQTPXYParametrizedErrorScatterGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
/*! \brief create a \c JKQTPXYParametrizedErrorScatterGraph with y-direction error bars, calculated from average +/- stddev of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -2240,7 +2240,7 @@ inline JKQTPXYParametrizedErrorScatterGraph* jkqtpstatAddXYErrorParametrizedScat
/*! \brief create horizontal boxplots of type \­a TGraph, from the 5-value-summary of groups in the input data
/*! \brief create horizontal boxplots of type \c TGraph, from the 5-value-summary of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\internal
@ -2307,7 +2307,7 @@ inline TGraph* jkqtpstatAddBoxplots(JKQTBasePlotter* plotter, InputCatIt inFirst
return graph;
}
/*! \brief create vertical boxplots of type \­a JKQTPBoxplotVerticalGraph, from the 5-value-summary of groups in the input data
/*! \brief create vertical boxplots of type \c JKQTPBoxplotVerticalGraph, from the 5-value-summary of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\internal
@ -2336,7 +2336,7 @@ inline JKQTPBoxplotVerticalGraph* jkqtpstatVAddBoxplots(JKQTBasePlotter* plotter
return jkqtpstatAddBoxplots<InputCatIt,InputValueIt,JKQTPBoxplotVerticalGraph>(plotter, inFirstCat_Y, inLastCat_Y, inFirstValue_X, inLastValue_X, quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile, groupDefFunc, columnBaseName);
}
/*! \brief create horizontal boxplots of type \­a JKQTPBoxplotHorizontalGraph, from the 5-value-summary of groups in the input data
/*! \brief create horizontal boxplots of type \c JKQTPBoxplotHorizontalGraph, from the 5-value-summary of groups in the input data
\ingroup jkqtptools_math_statistics_adaptors
\internal
@ -2365,7 +2365,7 @@ inline JKQTPBoxplotHorizontalGraph* jkqtpstatVAddBoxplots(JKQTBasePlotter* plott
return jkqtpstatAddBoxplots<InputCatIt,InputValueIt,JKQTPBoxplotHorizontalGraph>(plotter, inFirstCat_X, inLastCat_X, inFirstValue_Y, inLastValue_Y, quantile1Spec, quantile2Spec, minimumQuantile, maximumQuantile, groupDefFunc, columnBaseName);
}
/*! \brief create vertical boxplots of type \­a JKQTPBoxplotVerticalGraph, from the 5-value-summary of groups in the input data, also adds a graph showing the outliers
/*! \brief create vertical boxplots of type \c JKQTPBoxplotVerticalGraph, from the 5-value-summary of groups in the input data, also adds a graph showing the outliers
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_X and \a inLastCat_X
@ -2441,7 +2441,7 @@ inline std::pair<JKQTPBoxplotVerticalGraph*, JKQTPXYLineGraph*> jkqtpstatAddVBox
}
/*! \brief create vertical boxplots of type \­a JKQTPBoxplotHorizontalGraph, from the 5-value-summary of groups in the input data, also adds a graph showing the outliers
/*! \brief create vertical boxplots of type \c JKQTPBoxplotHorizontalGraph, from the 5-value-summary of groups in the input data, also adds a graph showing the outliers
\ingroup jkqtptools_math_statistics_adaptors
\tparam InputCatIt standard iterator type of \a inFirstCat_Y and \a inLastCat_Y