Table of Contents

Class StatisticRoutines

Namespace
NeuralNetworks.Core
Assembly
NeuralNetworks.dll

Provides extension methods for computing common statistics on single- and multi-dimensional float arrays, including argmax, min, max, sum, mean, standard deviation, and per-column aggregates.

public static class StatisticRoutines
Inheritance
StatisticRoutines
Inherited Members

Remarks

Methods are implemented for one-dimensional vectors and for two-, three-, and four-dimensional arrays. Standard deviation is computed as population standard deviation (dividing by the total element count).

Methods

Argmax(float[,])

Computes the index of the maximum value for each row.

public static int[] Argmax(this float[,] source)

Parameters

source float[,]

The two-dimensional array to evaluate.

Returns

int[]

An array of length equal to the number of rows, where each element is the column index of the maximum value in that row.

Argmax(float[])

Computes the index of the maximum value for each row.

public static int Argmax(this float[] source)

Parameters

source float[]

The array to evaluate.

Returns

int

The index of the maximum value in the array.

Max(float[,,,])

Returns the maximum element value across all elements of a four-dimensional array.

public static float Max(this float[,,,] source)

Parameters

source float[,,,]

The array to scan.

Returns

float

The maximum value found.

Max(float[,,])

Returns the maximum element value across all elements of a three-dimensional array.

public static float Max(this float[,,] source)

Parameters

source float[,,]

The array to scan.

Returns

float

The maximum value found.

Max(float[,])

Returns the maximum element value across all elements of a two-dimensional array.

public static float Max(this float[,] source)

Parameters

source float[,]

The array to scan.

Returns

float

The maximum value found.

Mean(float[,,,])

Calculates the mean of all elements in the source.

public static float Mean(this float[,,,] source)

Parameters

source float[,,,]

The array whose mean will be computed.

Returns

float

The arithmetic mean of all elements.

Mean(float[,,])

Calculates the mean of all elements in the source.

public static float Mean(this float[,,] source)

Parameters

source float[,,]

The array whose mean will be computed.

Returns

float

The arithmetic mean of all elements.

Mean(float[,])

Calculates the mean of all elements in the source.

public static float Mean(this float[,] source)

Parameters

source float[,]

The array whose mean will be computed.

Returns

float

The arithmetic mean of all elements.

MeanByColumn(float[,])

Calculates the mean of each column in the source.

public static float[] MeanByColumn(this float[,] source)

Parameters

source float[,]

The two-dimensional array to process.

Returns

float[]

A one-dimensional array where each element is the mean of a column.

Min(float[,,,])

Returns the minimum element value across all elements of a four-dimensional array.

public static float Min(this float[,,,] source)

Parameters

source float[,,,]

The array to scan.

Returns

float

The minimum value found.

Min(float[,,])

Returns the minimum element value across all elements of a three-dimensional array.

public static float Min(this float[,,] source)

Parameters

source float[,,]

The array to scan.

Returns

float

The minimum value found.

Min(float[,])

Returns the minimum element value across all elements of a two-dimensional array.

public static float Min(this float[,] source)

Parameters

source float[,]

The array to scan.

Returns

float

The minimum value found.

StdDev(float[,,,])

Calculates the standard deviation for all elements of a four-dimensional array.

public static float StdDev(this float[,,,] source)

Parameters

source float[,,,]

The array whose standard deviation will be computed.

Returns

float

The standard deviation of all elements.

Remarks

Standard deviation is calculated using the formula: sqrt(sum((x - mean)^2) / N), where N is the number of all elements in the array.

StdDev(float[,,])

Calculates the standard deviation for all elements of a three-dimensional array.

public static float StdDev(this float[,,] source)

Parameters

source float[,,]

The array whose standard deviation will be computed.

Returns

float

The standard deviation of all elements.

Remarks

Standard deviation is calculated using the formula: sqrt(sum((x - mean)^2) / N), where N is the number of all elements in the array.

StdDev(float[,])

Calculates the standard deviation for all elements of a two-dimensional array.

public static float StdDev(this float[,] source)

Parameters

source float[,]

The array whose standard deviation will be computed.

Returns

float

The standard deviation of all elements.

Remarks

Standard deviation is calculated using the formula: sqrt(sum((x - mean)^2) / N), where N is the number of all elements in the array.

Sum(float[,,,])

Calculates the sum of all elements in the four-dimensional array.

public static float Sum(this float[,,,] source)

Parameters

source float[,,,]

The array to sum.

Returns

float

The sum of all elements.

Sum(float[,,])

Calculates the sum of all elements in the three-dimensional array.

public static float Sum(this float[,,] source)

Parameters

source float[,,]

The array to sum.

Returns

float

The sum of all elements.

Sum(float[,])

Calculates the sum of all elements in the two-dimensional array.

public static float Sum(this float[,] source)

Parameters

source float[,]

The array to sum.

Returns

float

The sum of all elements.

SumByColumns(float[,])

Calculates the sum of each column in the source.

public static float[] SumByColumns(this float[,] source)

Parameters

source float[,]

The two-dimensional array to process.

Returns

float[]

A one-dimensional array where each element is the sum of a column.