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
1
vote
2 answers

How to fit f(x) = sin(x)*sin(x) function to your data?

I'm trying to fit f(x) = sin(x)*sin(x) function to my data, but I can not accurately do that: fitting result My data could have random phase shift and that is the main problem with this fitting. I use MathNet.Numerics library. My code for…
1
vote
0 answers

Regression in MathNet gives different results from Excel

I'm attempting to add a component that will do regression analysis on data in our application. I wrote a service that uses MathNet Numerics to perform a regression to compute coefficients for various characteristics. I'm testing it by passing it the…
Valuator
  • 3,262
  • 2
  • 29
  • 53
1
vote
0 answers

How to handle/get access to "deep" Errors in MathNet: what is parameter 4?

I execute d = (DenseMatrix)k.Solve(F); And get an InvalidParameterException: Message = "An invalid parameter was passed to a native method, parameter number : 4" What is parameter nr. 4? Where did I pass it into MathNet? How can I find out what…
Erik
  • 894
  • 1
  • 8
  • 25
1
vote
1 answer

How to use a random number from the weibull distribution?

I am trying to place Weibull distributed random numbers in a sector of a circle. I generated the random number, then distributed it in Weibull distribution. Now I want to use these Weibull distributed random numbers. RadarSpace…
1
vote
1 answer

How to calculate a Z-Critical value using Math.Net Numerics for a normal distribution?

Is there a way, using the Math.NET library to calculate z-critical values for a given confidence level? Most examples I've seen online suggest looking up the values in a table, but I'd like to do it programmatically if possible. I've gone through…
Brian Vallelunga
  • 9,869
  • 15
  • 60
  • 87
1
vote
0 answers

What is the difference between Mathnet.Numerics and Mathnet.Numerics.Signed?

There are two different nuget packages, MathNet.Numerics and MathNet.Numerics.Signed. How are they different? And does signed package include all features from MathNet.Numerics?
ozgur
  • 2,549
  • 4
  • 25
  • 40
1
vote
1 answer

F# Math.Net Matrix.mapRows to create new matrix with different size

I have a function that manipulates a Vector resulting a new Vector with different length, an example would be appending a number in front of the vector let addElementInfront (x:Vector) = x.ToArray() |> Array.append…
Jose Vu
  • 621
  • 5
  • 13
1
vote
1 answer

How do I group data into naturally occurring "Bins"

What approach should I use to sort the following into naturally occurring "bins". double[] x = { 18, 18, 18, 18, 19, 20, 20, 20, 21, 22, 22, 23, 24, 26, 27, 32, 33, 49, 52, 56,900,1200, 1200, 1500, 2000, 2000,2200,2200 }; I've looked at…
TLDR
  • 1,198
  • 1
  • 12
  • 31
1
vote
1 answer

Iteration over columns in Matrix using piping

I'm trying to divide matrix by its last row (each column by its last element - aka Homogeneous coordinates) and then return submatrix containing everything except that last row. Something like this in Matlab: normx =…
Dan
  • 77
  • 7
1
vote
1 answer

Write PolynomialFeatures function from scikit-learn for F#

I recently started to learn F#, I have learnt about the fslab for data science, however I cannot seem to find any function similar to the PolynomialFeatures from Scikit-Learn…
Jose Vu
  • 621
  • 5
  • 13
1
vote
0 answers

Implicit multiplication with Math.NET Infixes

Is there a way to force Infix.ParseOrThrow and related functions from the Math.NET Symbolics library to allow equations such as "4x + 3" instead of requiring the input to be "4*x + 3"?
user7706068
1
vote
1 answer

MathNet Real number evaluation

I have the following using MathNet library where child1 is -4.09 and child2 is -4.162. The result after Expression.Real((double1 - double2)) returns 0.072000000000000064. It should be 0.072. Can anyone please help me understand what is going…
klkj898
  • 31
  • 5
1
vote
2 answers

Find Critical Chi Square Value using MathNet.Numerics

So I want to get Critical Chi-Square Value using Significance level and Degrees of Freedom. I tried using MathNet.Numerics but couldn't find which method to use to get the Critical Chi-Square Value This was the documentation I'm referring, any help…
Femil Shajin
  • 1,768
  • 6
  • 24
  • 38
1
vote
2 answers

Why can't I access a namespace added through NuGet?

Because I want to use matrices in my program, I added the Math.NET library through NuGet in Visual Studio 2015. However, although I can see the library files in the Project References folder, VS doesn't seem to recognize any of the references to it.…
1
vote
1 answer

Where is vector in MathNet for f#

I am using Visual Studio 2017. I get an error on vector below: Severity Code Description Project File Line Suppression State Error FS0039 The value or constructor 'vector' is not defined. Maybe you want one of the following: Vector…
Ivan
  • 7,448
  • 14
  • 69
  • 134