-
Notifications
You must be signed in to change notification settings - Fork 0
Stats correlationmatrix equals
github-actions[bot] edited this page Sep 25, 2026
·
1 revision
Development build. This page describes
main, not a released package. The latest published Lodestar.Stats is 0.5.0 — read its documentation.
Home › Stats › Hypothesis tests
Compares the size and both matrices, value by value.
public bool Equals(CorrelationMatrix other)Parameters — other is the result to compare against.
Returns — true when both hold the same size and the same numbers, NaN included.
Example — two matrices computed apart are equal.
using Lodestar.Stats;
// Six observations of three variables, row by row.
double[] data =
[
1.2, 3.4, 10.0,
2.3, 3.1, 8.0,
3.1, 4.8, 9.5,
4.0, 4.2, 6.1,
5.5, 6.9, 4.0,
6.1, 6.0, 3.3,
];
bool same = Spearman.Matrix(data, 3).Equals(Spearman.Matrix(data, 3)); // => TrueRemarks — the generated equality would compare the arrays by reference, so two results holding the same numbers would be unequal.
Applies to — net10.0, netstandard2.0.
See also — CorrelationMatrix.