Repository navigation
Module_Statistics_Others_zh
cyclone_dll edited this page Jul 6, 2026
·
6 revisions
Vorcyc.Mathematics.Statistics.Others 是一个提供其他统计函数的类,包括协方差、相关系数和线性回归分析。
以下方法均位于类 :Vorcyc.Mathematics.Statistics.Others
📒目录
Vorcyc.Mathematics.Statistics.Others 是一个提供其他统计函数的类,包括协方差、相关系数和线性回归分析。
-
public static T Covariance<T>(this Span<T> x, Span<T> y) where T : INumber<T>- 计算两组数据的协方差。
- 参数:
-
x: 第一组数据。 -
y: 第二组数据。
-
- 返回值: 两组数据的协方差。
-
public static T CorrelationCoefficient<T>(this Span<T> x, Span<T> y) where T : IFloatingPointIeee754<T>- 计算两组数据的相关系数。
- 参数:
-
x: 第一组数据。 -
y: 第二组数据。
-
- 返回值: 两组数据的相关系数。
-
public static (T Slope, T Intercept) LinearRegression<T>(this Span<T> x, Span<T> y) where T : IFloatingPointIeee754<T>- 实现简单的线性回归分析。
- 参数:
-
x: 自变量数据。 -
y: 因变量数据。
-
- 返回值: 包含回归系数和截距的元组。
以下是一个使用 Others 类中多个方法的示例,并在示例中加入了注释:
using System;
using Vorcyc.Mathematics.Statistics;
public class OthersExample
{
public static void Main()
{
// 定义两组数据
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 };
// 计算协方差
double covariance = x.Covariance(y);
Console.WriteLine("Covariance: " + covariance);
// 计算相关系数
double correlationCoefficient = x.CorrelationCoefficient(y);
Console.WriteLine("Correlation Coefficient: " + correlationCoefficient);
// 进行线性回归分析
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 扩展
-
📒 示例