shared3p_statistics_distribution.sc
shared3p_statistics_distribution.sc
Module for visualising distribution of data.
Functions:
discreteDistributionCount
Find discrete distribution of an input vector.
Detailed Description
D - any protection domain |
Supported types - int32 / int64 |
Parameters
data |
- input vector |
isAvailable |
- vector indicating which elements of the input vector are available |
min |
- fixed lowest value in returned matrix (lower values from input vector are discarded) |
max |
- fixed highest value in returned matrix (higher values from input vector are discarded) |
K |
- minimum input size |
returns a matrix where the first row contains discrete distribution values and the second row contains counts for each value |
Leaks max - min |
discreteDistributionCount(with stepSize)
Find discrete distribution of an input vector.
Detailed Description
D - any protection domain |
Supported types - int32 / int64 |
Parameters
data |
- input vector |
isAvailable |
- vector indicating which elements of the input vector are available |
min |
- fixed lowest value in returned matrix (lower values from input vector are discarded) |
max |
- fixed highest value in returned matrix (higher values from input vector are discarded) |
stepSize |
- difference between adjacent values in returned matrix (values in returned matrix are: min, min + stepSize, min + 2*stepSize, min + 3*stepSize, …). Other values from input vector are discarded. |
K |
- minimum input size |
returns a matrix where the first row contains discrete distribution values and the second row contains counts for each value |
Leaks (max - min) / stepSize |
heatmap
Create a heatmap.
Detailed Description
D - shared3p |
Supported types - int32 / int64 / float32 / float64 |
Parameters
x |
- first sample |
y |
- second sample |
xIsAvailable |
- vector indicating which elements of x are available |
yIsAvailable |
- vector indicating which elements of y are available |
K |
- minimal length of bin side |
A heatmap (in this case) is a plot of two variables of a set of data. It can be used to visualise data in the same way as a scatterplot while leaking less information about individual values. Values of sample x will determine coordinates on the x axis and values of sample y will determine coordinates on the y axis. Instead of displaying individual points, this function counts the number of points in fixed rectangular areas (called bins). The counts will then be replaced with ranges. |
returns a matrix with two rows. The second row is a flattened matrix with as many elements as there are bins in the heatmap. The second row may actually be longer if there’s less than 8 elements in the matrix. Each bin will contain a number, starting from 1, which indicates the frequency range of the bin. When plotting, a bin with matrix coordinates (i, j) and value z will have its lower left point at (xmin + i · xstep, ymin + j · ystep), will have dimensions (xstep, ystep) and will indicate a frequency count in the range [zmin + z · zstep, zmin + (z + 1) · zstep). The first 8 elements of the first row are
|
Leaks the minimum and maximum values in both inputs |
Function Overloads
D int32 heatmap(D int32[[1]] x, D int32[[1]] y, D bool[[1]] xIsAvailable, D bool[[1]] yIsAvailable, uint K)
D int64 heatmap(D int64[[1]] x, D int64[[1]] y, D bool[[1]] xIsAvailable, D bool[[1]] yIsAvailable, uint K)
D float32 heatmap(D float32[[1]] x, D float32[[1]] y, D bool[[1]] xIsAvailable, D bool[[1]] yIsAvailable, uint K)
D float64 heatmap(D float64[[1]] x, D float64[[1]] y, D bool[[1]] xIsAvailable, D bool[[1]] yIsAvailable, uint K)
histogram
Create a histogram.
Detailed Description
D - any protection domain |
Supported types - int32 / int64 / float32 / float64 |
Parameters
data |
- input vector |
isAvailable |
- vector indicating which elements of the input vector are available |
returns a matrix where the first row contains histogram bin boundaries and the second row contains counts for each bin (note that the last element of the second row is always 0 because for n bins we have n+1 boundaries). An element x belongs to a bin with boundaries (a, b) if a < x ⇐ b. |
Leaks the minimum and maximum values in the input Leaks the number of missing values in the input |