Questions tagged [mathnet-numerics]

Math.NET Numerics is an opensource numerical library for .Net, Silverlight and Mono.

Math.NET Numerics is the numerical foundation of the Math.NET project, aiming to provide methods and algorithms for numerical computations in science, engineering and every day use. Covered topics include special functions, linear algebra, probability models, random numbers, statistics, interpolation, integration, curve fitting, integral transforms (FFT) and more.

In addition to the core .NET package (which is written entirely in C#), Numerics specifically supports F# 3.0 with idiomatic extension modules and maintains mathematical data structures like BigRational that originated in the F# PowerPack. If a performance boost is needed, the managed-code provider backing its linear algebra routines and decompositions can be exchanged with wrappers for optimized native implementations such as Intel MKL.

Supports Mono and .NET 4.0 on Linux, Mac and Windows, the portable version also Silverlight 5, WindowsPhone 8 and .NET for Windows Store apps.

Source: GitHub: Math.NET Numerics ReadMe file

230 questions
2
votes
2 answers

How to find a fitting power law?

Given the following set of xs and ys: xs = [8294400, 2073600, 921600, 409920] ys = [124, 433, 853, 1449] Fitting this with a power law in Excel yields a good approximation: Excel found a function of the form a(x^b). How can one determine a and b in…
Asik
  • 21,506
  • 6
  • 72
  • 131
2
votes
1 answer

MathNet.Filter not filtering data

I'm using Math.Net.Numerics to first fill an array with a sine wave, and then using Math.Net.Filtering to create a band pass to filter the data, like so: void Main() { double[] preProcessedData = new double[128]; double[] postProcessedData =…
user9993
  • 5,833
  • 11
  • 56
  • 117
2
votes
1 answer

How to convert an integer array to a matrix in c#

I have an integer array named resp I want to rewrite/convert it as/to a row matrix with name resp. int[] resp= {1, 0, 1, 0}; I am using the Mathnet.Numerics library. How can I do that?
Artiga
  • 776
  • 2
  • 16
  • 37
2
votes
1 answer

Slope Standard Error c#

Is there a function inside MathNet.Numerics to calculate regression slope error? double[] xdata = new double[] { 10, 20, 30 }; double[] ydata = new double[] { 15, 20, 25 }; Tuple p =…
user1234440
  • 22,521
  • 18
  • 61
  • 103
2
votes
1 answer

Getting the dimension of a Vector in Math.NET

If I was given a Vector in Math.NET, how can I check the number of dimensions that it has? I can't seem to find anything in the documentation
9a3eedi
  • 696
  • 2
  • 7
  • 18
2
votes
2 answers

How to get eigenvalues as a Vector listed in order of magnitude using MathNet Numerics?

I used the Evd<> class of MathNet Numerics to get the eigenvector of a matrix but it turned out to be of type Vector and I was unable to cast that into Vector, which is what I need for my operations. This is how I got the…
covfefe
  • 2,485
  • 8
  • 47
  • 77
2
votes
1 answer

Impossible to remove rows from matrix with Math.NET Numerics

I have a weird problem with Math.NET Numerics. Let say I have a matrix well instantiated and filled (I verified by writing it in a text file), which size is (949 x 30). All I want is to remove a row from this matrix. But it seems that I…
Kabulan0lak
  • 2,116
  • 1
  • 19
  • 34
2
votes
1 answer

MathNet.Numerics not utilizing the Mkl native provider

I have an F# project that uses MathNet.Numerics for Linear Algebra routines. I have placed the following code in an F# module: module LinearAlgebra open MathNet.Numerics open MathNet.Numerics.LinearAlgebra.Double open…
JTS
  • 33
  • 5
2
votes
2 answers

math.net installation for F#

I am quite new to F# and am trying to install math.net on Ubuntu 13.04. The following page recommends using the Package Manager Console to install on Linux 64 https://www.nuget.org/packages/MathNet.Numerics.MKL.Linux-x64/ but I am puzzled by the…
gappy
  • 10,095
  • 14
  • 54
  • 73
2
votes
2 answers

Is SVD included in MathNet.Numerics x86?

I need to calculate the Singular Value Decomposition of a Dense matrix but it doesn't seem to be included in the package I'm using: MathNet.Numerics x86 v2.4.0.26 downloaded from Nuget package manager. I am referencing this question Svd…
Felix Castor
  • 1,598
  • 1
  • 18
  • 39
2
votes
1 answer

MathNET Matrix Casting

I have recently started using the MathNET library and it is awesome. I am working heavily with matrices and vectors. The library works great, but I am finding that I have to use casting all the time; an example of this would be: using…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
2
votes
1 answer

math.net conversion of Matrix to Generic.Matrix

let v = [| 5.0; 2.0; 3.0; 11.0 |] let m2 = new DenseMatrix(2, 2, v) let invm = m2.Inverse() let invt = m2.Transpose() Here m2 is a Matrix. However, invm and invt are Generic.Matrix. Why this conversion?
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
2
votes
1 answer

MathNet Numerics out of memory exception

I'm using MathNet.Numerics in my F# project, and it runs out of memory when dealing with matrices that should be well within its remit. EDIT: The problem is definitely not with MathNet.Numerics. It's something I'm doing, though I have yet to work…
Rob Lyndon
  • 12,089
  • 5
  • 49
  • 74
2
votes
1 answer

C# Can LinearRegression code from Math.NET Numerics be made faster?

I need to do multiple linear regression efficiently. I am trying to use the Math.NET Numerics package but it seems slow - perhaps it is the way I have coded it? For this example I have only simple (1 x value) regression. I have this snippet: …
ManInMoon
  • 6,795
  • 15
  • 70
  • 133
2
votes
2 answers

Multiple Regression in Math.Net Numerics

I achieved simple single regression using math.net regression method like this: var xdata = new double[] { 10, 20, 30, 40, 50 }; var ydata = new double[] { 15, 20, 25, 55, 95 }; var X = DenseMatrix.CreateFromColumns(new[] { new…
1teamsah
  • 1,863
  • 3
  • 23
  • 43