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
0
votes
1 answer

Calculation of Math.NET iterative solvers are being canceled unexpectedly

I am comparing speed of my iterative solver in VB.NET and iterative solvers in Math.NET. When I am using preconditioner with Math.NET iterative solvers, everything is good and it converged at about 0.1~0.2(s) but without preconditioner calculation…
Amin
  • 11
  • 3
0
votes
0 answers

MathNet- Matrix returns wrong coefficients to polynomial best fit- C#

I used MathNet matrix calculations to calculate the coefficients for a 2nd degree polynomial. Matrix A = CreateMatrix.DenseOfColumnArrays(xPointsSquared, yPoints, ones); Matrix Y =…
DazedNConfused
  • 189
  • 2
  • 13
0
votes
1 answer

F# function takes too many arguments or used in a context not expected

I'm trying to implement a cost function and I currently have let computeCost (X : Matrix) (y : Vector) (theta : Vector) = let m = y.Count |> double let J = (1.0/(2.0*m))*(((X*theta - y) |> Vector.map (fun x ->…
Luke Xu
  • 2,302
  • 3
  • 19
  • 43
0
votes
1 answer

Why does MathNet.Numerics.Control.UseManaged require Cuda?

I'm trying to test an ASP API controller which in turn calls out to a DLL which uses MathNet.Numerics.LinearAlgebra. I first call MathNet.Numerics.Control.UseManaged(); However this call fails with the error Exception thrown:…
dumbledad
  • 16,305
  • 23
  • 120
  • 273
0
votes
1 answer

Invert 20X20 matrix with math.net numerics

I need to invert a 20X20 matrix, but I am getting incorrect results. I have created a test program using some values from my application: using System; using System.Diagnostics; using MathNet.Numerics.LinearAlgebra; using…
Phil Jollans
  • 3,605
  • 2
  • 37
  • 50
0
votes
0 answers

Transforming band matrix to normal

Is there any way to transform band matrix to normal with Math.NET Numerics library or some other ?
JFF
  • 1
  • 1
0
votes
2 answers

Fold by column in Math Net numerics, keeping track of number of columns

Using Math.Net numerics, I would like to do a task: Fold through each column, and multiply that column's value by the index of my vector. The problem is, none of the folding functions yield a counter...and counting within the folding functions is…
Chris
  • 28,822
  • 27
  • 83
  • 158
0
votes
0 answers

Math Net numerics performance slow in asp.net application

I'm computing heavy (100000) matrix computations(like multiply/add/substract). When I do it in simple console application it's performance is fine. But when I place same code in simple asp.net web application and invoking process in button…
malkam
  • 2,337
  • 1
  • 14
  • 17
0
votes
1 answer

use beta distribution from mathdotnet in C# in VS2013

I ma using mathdotnet form C# in VS2013. I need to generate a sequence of samples from IEnumerable Samples(double a, double b) at http://numerics.mathdotnet.com/api/MathNet.Numerics.Distributions/Beta.htm#Samples I do not know how to…
user3601704
  • 753
  • 1
  • 14
  • 46
0
votes
2 answers

MathNet. RandomSource

The .Net package "MathNet.Numerics.Distributions" contains a method Normal(double mean, double stddev, Random randomSource). The first two parameters are double which can easily be set. But the third parameter Random randdomSource is causing…
0
votes
1 answer

Filling and manipulating matrices using MathNet.Numerics

I'm working on a code where I need to represent a small number of matrices (around 10) and do some operations with them (like get the inverse, transposed, etc). One of my co-workers recommended using the Math.Net Iridium library. The referred page…
lucas.mdo
  • 339
  • 7
  • 27
0
votes
1 answer

how to remove rows and cols from main matrix after SVD function?

I have : A = 1 2 3 2 4 5 5 5 5 and [U S V]=svd(A) How can I remove the dimension of A matrix from SVD function?
Tarrah Arshad
  • 74
  • 2
  • 9
0
votes
1 answer

Discrepancies between MathNet and Octave calculating Normal Equation

OK, so here is my code for calculating Normal Equation using c# & MathNet: using System; using System.Collections.Generic; using System.Collections.ObjectModel; using MathNet.Numerics.LinearAlgebra; using MathNet.Numerics.LinearRegression; using…
0
votes
1 answer

Fourier transformation with mathdotnet in F#

I am trying to use the Math.NET numerics implementation of the FFT algorithm, but I must be doing something wrong because the output is always unit The following is the the setup: open MathNet.Numerics open MathNet.Numerics.Statistics open…
user1129988
  • 1,516
  • 4
  • 19
  • 32
0
votes
1 answer

How to compare Matrix elements in Math.Net numerics in F#

In this question, I asked how to perform a similar operation using PowerPack. I have decided to use MathNet instead as it is designed for .Net in general, not just F#. I need a function that takes 2 matrices and outputs the percentage of agreement.…
Chechy Levas
  • 2,206
  • 1
  • 13
  • 28