diff --git a/docs/ConfusionMatrixChart.html b/docs/ConfusionMatrixChart.html new file mode 100644 index 00000000..4d7c6ca4 --- /dev/null +++ b/docs/ConfusionMatrixChart.html @@ -0,0 +1,184 @@ + + +
+ConfusionMatrixChart
+ Create object p, a Confusion Matrix Chart object. +
+"DiagonalColor"
The color of the patches on the diagonal, default is [0.0, 0.4471, 0.7412]. +
+ +"OffDiagonalColor"
The color of the patches off the diagonal, default is [0.851, 0.3255, 0.098]. +
+ +"GridVisible"
Available values: on
(default), off
.
+
"Normalization"
Available values: absolute
(default), column-normalized
,
+ row-normalized
, total-normalized
.
+
"ColumnSummary"
Available values: off
(default), absolute
,
+ column-normalized
,total-normalized
.
+
"RowSummary"
Available values: off
(default), absolute
,
+ row-normalized
, total-normalized
.
+
MATLAB compatibility – the not implemented properties are: FontColor, + PositionConstraint, InnerPosition, Layout. +
+See also: + confusionchart +
+Source Code: + ConfusionMatrixChart +
+ | + + ## Create a simple ConfusionMatrixChart Object + + cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"},{"XLabel","LABEL A"}) + NormalizedValues = cm.NormalizedValues + ClassLabels = cm.ClassLabels + +cm = + +ConfusionMatrixChart with properties: + + NormalizedValues: [ 2x2 double ] + ClassLabels: { 1x2 cell } + + +NormalizedValues = + + 1 2 + 1 2 + +ClassLabels = +{ + [1,1] = A + [1,2] = B +} + + |
cl_multinom
+ Confidence level of multinomial portions. +
+ cl_multinom
returns confidence level of multinomial parameters
+ estimated as with predefined confidence interval
+ b. Finite population is also considered.
+
This function calculates the level of confidence at which the samples + represent the true distribution given that there is a predefined tolerance + (confidence interval). This is the upside down case of the typical excercises + at which we want to get the confidence interval given the confidence level + (and the estimated parameters of the underlying distribution). + But once we accept (lets say at elections) that we have a standard predefined + maximal acceptable error rate (e.g. b=0.02 ) in the estimation and we + just want to know that how sure we can be that the measured proportions are + the same as in the entire population (ie. the expected value and mean of the + samples are roughly the same) we need to use this function. +
+ +Variable | Type | Description | ||
---|---|---|---|---|
X | int vector | sample frequencies bins. | ||
N | int scalar | Population size that was sampled
+ by X. If N < sum (X) , infinite number assumed. | ||
b | real vector | confidence interval. If vector, + it should be the size of X containing confence interval for each cells. + If scalar, each cell will have the same value of b unless it is zero or -1. + If value is 0, b = 0.02 is assumed which is standard choice at + elections otherwise it is calculated in a way that one sample in a cell + alteration defines the confidence interval. | ||
method | string | An optional argument
+ for defining the calculation method. Available choices are
+ "bromaghin" (default), "cochran" , and agresti_cull . |
Note! The agresti_cull
method is not exactly the solution at
+ reference given below but an adjustment of the solutions above.
+
Confidence level. +
+ +CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) + returns 0.69 confidence level. +
+ +Jeffrey F. Bromaghin, "Sample Size Determination for Interval Estimation + of Multinomial Probabilities", The American Statistician vol 47, 1993, + pp 203-206. +
+Robert T. Tortora, "A Note on Sample Size Estimation for Multinomial + Populations", The American Statistician, , Vol 32. 1978, pp 100-102. +
+A. Agresti and B.A. Coull, "Approximate is better than ’exact’ for + interval estimation of binomial portions", The American Statistician, + Vol. 52, 1998, pp 119-126 +
Source Code: + cl_multinom +
+ | + + CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) + +CL = 0.6923 + |
correlation_test
+ Perform a correlation coefficient test whether two samples x and + y come from uncorrelated populations. +
+ h = correlation_test (y, x)
tests the null
+ hypothesis that the two samples x and y come from uncorrelated
+ populations. The result is h = 0 if the null hypothesis cannot be
+ rejected at the 5% significance level, or h = 1 if the null hypothesis
+ can be rejected at the 5% level. y and x must be vectors of
+ equal length with finite real numbers.
+
The p-value of the test is returned in pval. stats is a + structure with the following fields: +
Field | Value | ||
---|---|---|---|
method | the type of correlation coefficient used + for the test | ||
df | the degrees of freedom (where applicable) | ||
corrcoef | the correlation coefficient | ||
stat | the test’s statistic | ||
dist | the respective distribution for the test | ||
alt | the alternative hypothesis for the test |
[…] = correlation_test (…, name, value)
+ specifies one or more of the following name/value pairs:
+
Name | Value | |
---|---|---|
"alpha" | the significance level. Default is 0.05. | |
"tail" | a string specifying the alternative hypothesis |
"both" | is not 0 (two-tailed, default) | |
"left" | is less than 0 (left-tailed) | |
"right" | is greater than 0 + (right-tailed) |
"method" | a string specifying the correlation + coefficient used for the test |
"pearson" | Pearson’s product moment correlation + (Default) | |
"kendall" | Kendall’s rank correlation tau | |
"spearman" | Spearman’s rank correlation rho |
See also: + regression_ftest, + regression_ttest +
+Source Code: + correlation_test +
+ ConfusionMatrixChart
+
+
@@ -398,6 +406,14 @@
+
+
+
+ cl_multinom
+
+
+ Confidence level of multinomial portions.
+
@@ -2214,6 +2230,15 @@
Perform a chi-squared test (for independence or homogeneity).
+
+
+
+ correlation_test
+
+
+ Perform a correlation coefficient test whether two samples X and Y come
+from uncorrelated populations.
+
diff --git a/docs/kmeans.html b/docs/kmeans.html
index dec0bd73..d7b9d007 100644
--- a/docs/kmeans.html
+++ b/docs/kmeans.html
@@ -368,12 +368,12 @@
title ("Cluster Assignments and Centroids");
hold off
-Replicate 1, 8 iterations, total sum of distances = 193.571.
-Replicate 2, 5 iterations, total sum of distances = 193.571.
-Replicate 3, 5 iterations, total sum of distances = 193.571.
-Replicate 4, 5 iterations, total sum of distances = 193.571.
-Replicate 5, 7 iterations, total sum of distances = 193.571.
-Best total sum of distances = 193.571
+Replicate 1, 4 iterations, total sum of distances = 197.268.
+Replicate 2, 5 iterations, total sum of distances = 197.268.
+Replicate 3, 3 iterations, total sum of distances = 197.268.
+Replicate 4, 1 iterations, total sum of distances = 349.143.
+Replicate 5, 1 iterations, total sum of distances = 322.676.
+Best total sum of distances = 197.268
diff --git a/docs/kruskalwallis.html b/docs/kruskalwallis.html
index c645a909..deb2ad72 100644
--- a/docs/kruskalwallis.html
+++ b/docs/kruskalwallis.html
@@ -166,8 +166,8 @@
Kruskal-Wallis ANOVA Table
Source SS df MS Chi-sq Prob>Chi-sq
---------------------------------------------------------
-Columns 3060.33 5 612.07 27.57 4.41534e-05
-Error 824.67 30 27.49
+Columns 3284.00 5 656.80 29.59 1.77936e-05
+Error 601.00 30 20.03
Total 3885.00 35
Name | Value | |
---|---|---|
"alpha" | the significance level. Default is 0.05. | |
"tail" | a string specifying the alternative hypothesis: | |
"alpha" | the significance level. Default is 0.05. | |
"tail" | a string specifying the alternative hypothesis |
"both" | is not 0 (two-tailed, default) | |
"left" | is less than 0 (left-tailed) | |
"right" | is greater than 0 (right-tailed) | |
"both" | is not 0 (two-tailed, default) | |
"left" | is less than 0 (left-tailed) | |
"right" | is greater than 0 (right-tailed) |
See also: diff --git a/docs/slicesample.html b/docs/slicesample.html index 875bd25e..df821250 100644 --- a/docs/slicesample.html +++ b/docs/slicesample.html @@ -199,9 +199,9 @@