Repository navigation
Module_Statistics_Others
cyclone_dll edited this page Jul 6, 2026
·
8 revisions
Location: Home / Statistics module / Other statistics functions
Vorcyc.Mathematics.Statistics.Others provides additional statistical functions including covariance, correlation coefficient, and linear regression analysis.
All methods below are on class:
Vorcyc.Mathematics.Statistics.Others
📒Contents
Vorcyc.Mathematics.Statistics.Others provides additional statistical functions including covariance, correlation coefficient, and linear regression analysis.
-
public static T Covariance<T>(this Span<T> x, Span<T> y) where T : INumber<T>- Computes the covariance of two data sets.
- Parameters:
-
x: First data set. -
y: Second data set.
-
- Returns: Covariance of the two data sets.
-
public static T CorrelationCoefficient<T>(this Span<T> x, Span<T> y) where T : IFloatingPointIeee754<T>- Computes the correlation coefficient of two data sets.
- Parameters:
-
x: First data set. -
y: Second data set.
-
- Returns: Correlation coefficient of the two data sets.
-
public static (T Slope, T Intercept) LinearRegression<T>(this Span<T> x, Span<T> y) where T : IFloatingPointIeee754<T>- Performs simple linear regression analysis.
- Parameters:
-
x: Independent variable data. -
y: Dependent variable data.
-
- Returns: Tuple of slope and intercept.
Example using multiple methods from the Others class, with comments:
using System;
using Vorcyc.Mathematics.Statistics;
public class OthersExample
{
public static void Main()
{
// Define two data sets
Span<double> x = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0 };
Span<double> y = new double[] { 2.0, 4.0, 6.0, 8.0, 10.0 };
// Compute covariance
double covariance = x.Covariance(y);
Console.WriteLine("Covariance: " + covariance);
// Compute correlation coefficient
double correlationCoefficient = x.CorrelationCoefficient(y);
Console.WriteLine("Correlation Coefficient: " + correlationCoefficient);
// Linear regression
var (slope, intercept) = x.LinearRegression(y);
Console.WriteLine($"Linear Regression: Slope = {slope}, Intercept = {intercept}");
}
}-
- 🔖 ArrayExtension class
- 🔖 BaseConverter class
- 🔖 BitMathExtension class
- 🔖 Combinatorics class
- 🔖 ConstantsFp32 class
- 🔖 NumberMapper class
- 🔖 PinnableArray<T> class
- 🔖 SimpleRNG_Fp32 and SimpleRNG_Fp64 classes
- 🔖 TrigonometryHelper class
- 🔖 VMath class
- 🔖 Pinned buffers (Buffers)
- 🔖 IPinnedBuffer<T> interface
- 🔖 POHBuffer<T> class
- 🔖 NativeBuffer<T> class
-
- 🔖 0.9 classifier walkthrough
- 🔖 KNN<T> class
- 🔖 MultipleLinearRegression<T> class
- 🔖 SimpleLinearRegression<T> class
- 🔖 SupportVectorMachine<TSelf> class
- 🔖 DBSCAN<T> class
- 🔖 ExpectationMaximization<T> class
- 🔖 GMM<T> class
- 🔖 HierarchicalClustering<T> class
- 🔖 KMeansClusterer<T> class
- 🔖 VectorQuantization<T> class
- 🔖 FactorAnalysis<T> class
- 🔖 PCA<TSelf> class
- 🔖 TSNE<T> class
- 🔖 Distance metric classes
-
📒 Examples
-
📒 GPU 策略说明
- 🔖 为何放弃主包 GPU
- 🔖 当前性能路径
- 🔖 若仍需要更强算力
-
📒 计算上下文模块
-
📒 核心模块
-
📒 深度学习模块
-
📒 线性代数模块
-
📒 机器学习模块
- 🔖 0.9 分类器完整示例
- 🔖 KNN<T> 类
- 🔖 MultipleLinearRegression<T> 类
- 🔖 SimpleLinearRegression<T> 类
- 🔖 SupportVectorMachine<TSelf> 类
- 🔖 DBSCAN<T> 类
- 🔖 ExpectationMaximization<T> 类
- 🔖 GMM<T> 类
- 🔖 HierarchicalClustering<T> 类
- 🔖 KMeansClusterer<T> 类
- 🔖 VectorQuantization<T> 类
- 🔖 FactorAnalysis<T> 类
- 🔖 PCA<TSelf> 类
- 🔖 TSNE<T> 类
- 🔖 距离度量类
-
📒 信号处理模块
-
📒 数值模块
-
📒 统计模块
- 🔖 基础统计函数
- 🔖 高级统计函数
- 🔖 稳健统计 / RunningMoments
- 🔖 其它统计函数
- 🔖 分布相关函数
- 🔖 时间序列分析
- 🔖 IComparable 扩展
- 🔖 ExtremeValueFinder
- 🔖 INumber 扩展
-
📒 FFTW 扩展
-
📒 示例