Regression 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Regression --version 1.1.0
                    
NuGet\Install-Package Regression -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Regression" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Regression" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Regression" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Regression --version 1.1.0
                    
#r "nuget: Regression, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Regression@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Regression&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Regression&version=1.1.0
                    
Install as a Cake Tool

Библиотека работы с статистикой

AlphaPascal.Math.Regression

Polynomial regression/approximation and interpolation.

Two-factor polynomial fit (X1, X2 → Y)

Both solvers implement IPolynomialFitService (GetValues(IEnumerable<DataTwoFact>)), take an IBasisExponents (SecondOrderBasisExponents / ThirdOrderBasisExponents / FourthOrderBasisExponents, 9 / 16 / 25 coefficients) and return the coefficients of the original monomials X1^i · X2^j in that basis's fixed order, so they are interchangeable:

Func<List<DataTwoFact>, IEnumerable<double>> leastSquares =
    data => new PolynomialLeastSquaresSolver(new ThirdOrderBasisExponents()).GetValues(data);
Func<List<DataTwoFact>, IEnumerable<double>> minimax =
    data => new MinimaxPolynomialSolver(new ThirdOrderBasisExponents()).GetValues(data);
Solver Minimizes Use when
PolynomialLeastSquaresSolver (also ILeastSquaresRegressionService) sum of squared errors Default. Accuracy matters between calibration temperatures, or the data may contain noisy points.
MinimaxPolynomialSolver maximum absolute error over the given points Acceptance is a max-error bound checked strictly at the calibration points.

MinimaxPolynomialSolver is iterative (Lawson's reweighted least squares, maxIterations default 1000) and lands within a few percent of the exact minimax optimum. It lowers the in-sample max error (third order on the 223/224 datasets: 0.00152 → 0.00095 and 0.00144 → 0.00104), but it chases the worst points: a noisy point pulls the whole fit toward itself, and it predicts unseen temperatures worse than least squares (leave-one-series-out, worst interior series: 0.0019 → 0.0029 and 0.0032 → 0.0048).

For either solver, the number of distinct temperatures must exceed the temperature degree of the basis: at least 3 / 4 / 5 for second / third / fourth order. Otherwise the high-power terms are undetermined, and the in-sample error will not show it.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 56 10/1/2026
1.2.0 56 9/29/2026
1.1.0 70 9/25/2026
1.0.7 63 9/23/2026
1.0.6 68 9/22/2026
1.0.5 242 10/14/2025
1.0.4 247 6/15/2024
1.0.3 184 6/15/2024
1.0.2 191 5/6/2024
1.0.1 314 6/30/2023
1.0.0 275 6/29/2023