Math.NET Numericshttp://mathnetnumerics.codeplex.com/project/feeds/rssMath.NET Numerics is an open source numerical library for the .NET Framework and Mono.New Post: Calculate implied volatilityhttp://mathnetnumerics.codeplex.com/discussions/572925<div style="line-height: normal;">Is it possible to use Math.Net to compute implied volatility given the market price of an option?<br />
</div>thelearnerukSun, 23 Nov 2014 16:30:44 GMTNew Post: Calculate implied volatility 20141123043044PNew Post: Noncentral StudentT.InvCDFhttp://mathnetnumerics.codeplex.com/discussions/572824<div style="line-height: normal;">I am attempting to calculate the Inverse CDF of the Student T distribution with a non-centrality parameter (I assume this is the location) of 5.202, a DF of 9 at a probability of 0.95. I am using this code: <br />
<pre><code>double tA = StudentT.InvCDF(5.202, 1, 9, 0.95);</code></pre>
This results in tA value of 7.035. When I check this result in R using the following code:<br />
<pre><code>qt(0.95,9,5.202)</code></pre>
I get a result of 9.206 (the correct answer). Any idea what I am doing wrong?<br />
</div>SimpleDavidFri, 21 Nov 2014 21:55:51 GMTNew Post: Noncentral StudentT.InvCDF 20141121095551PNew Post: Neural Net speed uphttp://mathnetnumerics.codeplex.com/discussions/572364<div style="line-height: normal;">Am having a bit of trouble trying to figure out how to use MNNumerics to speed up either one of the following sets of neural net code
<br />
<br />
HeatOnResearchs encog framework in dotnet (aka replacing all the matrix operations/hessians etc)
<br />
<br />
or
<br />
<br />
<a href="http://visualstudiomagazine.com/articles/2013/08/01/neural-network-back-propagation-using-c.aspx" rel="nofollow">http://visualstudiomagazine.com/articles/2013/08/01/neural-network-back-propagation-using-c.aspx</a> by James McCaffray<br />
</div>MarkiemarkusTue, 18 Nov 2014 04:19:36 GMTNew Post: Neural Net speed up 20141118041936ANew Post: Eigenvalues / Eigenvectorhttp://mathnetnumerics.codeplex.com/discussions/572026<div style="line-height: normal;">Hallo Christoph,<br />
<br />
How can I tell? I have downloaded the "RECOMMENDED DOWNLOAD" and used the .net 3.5 Version and used the MathNet.Numerics.dll wih the following code:<br />
<pre><code> M = M.Build.Dense(tmpG.dimension, tmpg.dimension)
' this is just parsing from another Matrix class I have been using into the MATh.NEt matrix class
For i As Integer = 0 To tmpG.dimension - 1
M.SetRow(i, tmpG.Matrix.Row(i).ToArray)
Next
tmpEVD = M.Evd(Symmetricity.Symmetric)
print(M.toString())
print(tmpEVD.Eigenvectors.toString())
print(tmpEVD.D.ToString())</code></pre>
I can also post the matrix as *.csv if that helps.<br />
<br />
However can you tell me which Algorithmen is used within Math.net to compute the eigenvalues to get a better understanding of which problems or errors might occure, since I came to understand that especially if the Eigenvalues of the matrix are not unique the resulting eigenvectors might be wrong as well...<br />
<br />
To add to my EDIT:<br />
It seams that the Eigenvectors associated with the Eigenvalues of -1 (which schould be 0) are correct.<br />
<br />
thanks<br />
<br />
Richard<br />
<br />
EDIT: I have to appologice Issue two I have resoved there was an error in my matrix. However the other questions are still there.<br />
</div>schaf82Fri, 14 Nov 2014 20:25:45 GMTNew Post: Eigenvalues / Eigenvector 20141114082545PNew Post: .NET Corehttps://mathnetnumerics.codeplex.com/discussions/572045<div style="line-height: normal;">I have created a proof-of-concept PR (#265) that creates DLLs for aspnet50 and aspnetcore50 targets. It's probably better to wait for a finalized release next year as the referenced assemblies are still a moving target.
<br />
<br />
VS2015 and the K runtime are available from visualstudio.com and <a href="https://github.com/aspnet/Home" rel="nofollow">https://github.com/aspnet/Home</a> respectively<br />
</div>TragetaschenFri, 14 Nov 2014 19:00:33 GMTNew Post: .NET Core 20141114070033PNew Post: matrix exponentialhttp://mathnetnumerics.codeplex.com/discussions/571946<div style="line-height: normal;">Hello cdrnet - yes this is the Function i want to use...
<br />
Now i have build it for my owen
<br />
<br />
Thank you for replay<br />
</div>BruecknertFri, 14 Nov 2014 11:05:26 GMTNew Post: matrix exponential 20141114110526ANew Post: Mean replacement (matlab)http://mathnetnumerics.codeplex.com/discussions/569856<div style="line-height: normal;">Just for reference: <a href="http://ch.mathworks.com/help/matlab/ref/mean.html" rel="nofollow">MATLAB mean docs</a>.<br />
</div>cdrnetFri, 14 Nov 2014 10:33:26 GMTNew Post: Mean replacement (matlab) 20141114103326ANew Post: .NET Corehttp://mathnetnumerics.codeplex.com/discussions/572045<div style="line-height: normal;">We certainly want to support it. Is there something we can do already? (I do not have any vnext tools installed yet, but do have access to MSDN.)
<br />
<br />
Thanks,
<br />
Christoph<br />
</div>cdrnetFri, 14 Nov 2014 10:21:24 GMTNew Post: .NET Core 20141114102124ANew Post: Eigenvalues / Eigenvectorhttp://mathnetnumerics.codeplex.com/discussions/572026<div style="line-height: normal;">Thanks, I'll have to look into this in more detail. Are you using the managed or the MKL provider in Math.NET?
<br />
<br />
Thanks,
<br />
Christoph<br />
</div>cdrnetFri, 14 Nov 2014 10:19:32 GMTNew Post: Eigenvalues / Eigenvector 20141114101932ANew Post: matrix exponentialhttp://mathnetnumerics.codeplex.com/discussions/571946<div style="line-height: normal;">You are referring to <a href="https://en.wikipedia.org/wiki/Matrix_exponential" rel="nofollow">this function</a>? We do not support it out of the box yet, but we certainly want to have it in the future as it has a few very useful use cases.<br />
</div>cdrnetFri, 14 Nov 2014 10:17:17 GMTNew Post: matrix exponential 20141114101717ANew Post: CoreCLRhttps://mathnetnumerics.codeplex.com/discussions/572045<div style="line-height: normal;">Are there already plans to support the CoreCLR introduced with Visual Studio 2015?<br />
</div>TragetaschenFri, 14 Nov 2014 02:27:06 GMTNew Post: CoreCLR 20141114022706ANew Post: Eigenvalues / Eigenvectorhttp://mathnetnumerics.codeplex.com/discussions/572026<div style="line-height: normal;">Hallo all,
<br />
<br />
I looked into Math.NET for usage in my Research. More specific I am looking for a library that can compute the Eigenvectors and Values of medium (500+) matrices. I need this for graph matching and graph drawing. My background is Architecture with a little bit of knowledge in programming and math but unfortunatly not enough to understand all the problems of the implementation of algorithms calculating eigenvalues/eigenvectors. The aim is to use graphMatching within the field of Architecture for the generation of layouts.
<br />
<br />
I have had a quick look into the .evd() function and it works better than other libraries I have looked at. But a few questions have poped up about the outputs:<br />
<ol>
<li>
Laplacian Matrix
<br />
All publications read so far on Laplacian matrices asure me that the resulting eigenvalues should be equal or larger than 0 for a symetric matrix. (e.g. <a href="http://en.wikipedia.org/wiki/Laplacian_matrix" rel="nofollow">http://en.wikipedia.org/wiki/Laplacian_matrix</a>)
<br />
However with a spares matrix of 553*553 enteries the smallest Eigenvalues is given with -1.<br />
</li>
</ol>
What did I miss?<br />
<ol>
<li>
Different outputs for the same Matrix
<br />
If have checked the outputs for the following laplacianMatrix with different libraries (MATH.net and Wolfram Alpha):
<br />
[ {4,-1,-1,-1,-1},{-1,4,-1,-1,-1},{-1,-1,4,-1,-1},{-1,-1,-1,4,-1},{-1,-1,-1,-1,4}]
<br />
This is the Laplacian Matrix of the K5 Graph.<br />
</li>
</ol>
This will output the Eigenvalues of 0, 5, 5, 5, 5.<br />
The Eigenvector for the Eigenvalue 0 will be the same in both cases but the other Eigenvalues do not match at all.
<br />
<br />
Thx for any help,
<br />
<br />
Best Richard<br />
</div>schaf82Thu, 13 Nov 2014 20:00:18 GMTNew Post: Eigenvalues / Eigenvector 20141113080018PNew Post: matrix exponentialhttp://mathnetnumerics.codeplex.com/discussions/571946<div style="line-height: normal;">how can i get the exponential from a matrix - cant find the function. how can i build it<br />
</div>BruecknertThu, 13 Nov 2014 07:14:43 GMTNew Post: matrix exponential 20141113071443ANew Post: The result of SVD of Math.Net seems different from Matlabhttp://mathnetnumerics.codeplex.com/discussions/571427<div style="line-height: normal;">Both seem to be correct. Only the singular values are uniquely determined in an SVD, and only if they are ordered the same way. U and V are related, but not uniquely determined.
<br />
<br />
Note that with Math.NET Numerics, VT is already transposed (hence the T suffix), so H = U<em>W</em>VT. Once you transpose VT back to get V, the only difference between the two solutions is the negation of the middle column of both U and VT.
<br />
<br />
See <a href="http://math.stackexchange.com/questions/644327/how-unique-on-non-unique-are-u-and-v-in-singular-value-decomposition-svd" rel="nofollow">How unique (on non-unique) are U and V in Singular Value Decomposition (SVD)?</a> for some details on why this is allowed.
<br />
<br />
Thanks,
<br />
Christoph<br />
</div>cdrnetThu, 06 Nov 2014 17:43:09 GMTNew Post: The result of SVD of Math.Net seems different from Matlab 20141106054309PNew Post: The result of SVD of Math.Net seems different from Matlabhttp://mathnetnumerics.codeplex.com/discussions/571427<div style="line-height: normal;">Hi, I tried to move some of my code from matlab to C#, but got a problem.<br />
<br />
I have a matrix as<br />
<pre><code> H =
-65.2236 -17.8837 -22.4864
-29.5138 -17.3710 -6.4183
-13.1218 87.7046 -22.1451</code></pre>
If I find the SVD (U<em>S</em>V' = H) with Matlab, I got<br />
<pre><code>U =
0.1879 0.8883 0.4191
0.1904 0.3857 -0.9028
-0.9636 0.2494 -0.0967
S =
92.6983 0 0
0 77.7989 0
0 0 1.6234
V =
-0.0564 -0.9331 0.3552
-0.9836 -0.0092 -0.1802
0.1714 -0.3595 -0.9172</code></pre>
While from Math.Net with H.Svd(true), I got<br />
<pre><code>U =
0.187853 -0.888287 0.419114
0.190403 -0.385682 -0.902771
-0.963565 -0.249389 -0.096681
W =
92.6983 0 0
0 77.7989 0
0 0 1.62345
VT =
-0.0564014 -0.983579 0.171439
0.933081 0.00916406 0.359549
0.355216 -0.180245 -0.917242</code></pre>
Do anyone have idea which one is correct?<br />
<br />
Thank you<br />
</div>nbdxkfqThu, 06 Nov 2014 09:38:45 GMTNew Post: The result of SVD of Math.Net seems different from Matlab 20141106093845ANew Post: Sparse matrix performancehttp://mathnetnumerics.codeplex.com/discussions/543114<div style="line-height: normal;">I needed a fast Kronecker product for sparse matrices recently, so here's the updated code. Feel free to use ...
<br />
<br />
Source: <a href="http://wo80.bplaced.net/files/MathNet.Numerics.Extensions-src.zip" rel="nofollow">MathNet.Numerics.Extensions-src.zip</a>
<br />
<br />
Benchmark (old vs. new):<br />
<pre><code>Kronecker ( 5x 5) X (2410x2410) 5362ms 9ms OK
Kronecker ( 5x10) X (2410x2410) 5218ms 9ms OK
Kronecker (10x 5) X (2410x2410) 7279ms 9ms OK</code></pre>
</div>wo80Thu, 16 Oct 2014 13:14:14 GMTNew Post: Sparse matrix performance 20141016011414PNew Post: Mean replacement (matlab)http://mathnetnumerics.codeplex.com/discussions/569856<div style="line-height: normal;">hello togehter,
<br />
<br />
i tried a lot, but i could find any solution for the replacement of mean in matlab
<br />
for vectors and matrices.
<br />
Perhaps one of you has already a solution of a implementation of this with math.NET?
<br />
<br />
best regards,
<br />
michael<br />
</div>devil69Wed, 15 Oct 2014 14:28:47 GMTNew Post: Mean replacement (matlab) 20141015022847PNew Post: Error Message in Cholesky Factorizationhttp://mathnetnumerics.codeplex.com/discussions/568272<div style="line-height: normal;">I am trying to calculate Cholesky factorization of a sparse 320 by 320 matrix with 2424 nonzeros. I know the matrix is symmetric and positive definite (eigenvalues are spread between 0.03 and 7328.95. by the way EVD takes a long time for this relatively small matrix).
<br />
However, when I want to use Cholesky factorization, I get an error message : "Matrix must be positive definite."
<br />
Of course, the matrix is not well-conditioned but it is not also terrible. I am able to factorize matrices with larger condition number. What do you think the problem would be?
<br />
Thanks<br />
</div>burak11Wed, 24 Sep 2014 15:53:59 GMTNew Post: Error Message in Cholesky Factorization 20140924035359PNew Post: add several vectorshttps://mathnetnumerics.codeplex.com/discussions/567261<div style="line-height: normal;">Alternatively, if the vectors are very large you could try whether the following is faster:<br />
<pre><code>var result = new double[length];
foreach(var array in arrays)
{
Control.LinearAlgebraProvider.AddArrays(array, result, result);
}</code></pre>
Of course, if the vectors were actual Math.NET Numerics vectors you could do:<br />
<pre><code>var vectors = new List<Vector<double>>();
vectors.Aggregate((a, b) => a + b);</code></pre>
Thanks,<br />
Christoph<br />
</div>cdrnetSun, 21 Sep 2014 07:03:34 GMTNew Post: add several vectors 20140921070334ANew Post: StyleCophttp://mathnetnumerics.codeplex.com/discussions/561901<div style="line-height: normal;">Hi Candy,
<br />
<br />
I don't use anything beside JetBrains Resharper. To my understanding the StyleCop installer can optionally modify the Resharper configuration so that it is in line with the StyleCop rules, but I did not enabled this on my system because I personally disagree with quite a few of these rules (so I disable the rules instead).
<br />
<br />
Thanks,
<br />
Christoph<br />
</div>cdrnetSun, 21 Sep 2014 06:53:38 GMTNew Post: StyleCop 20140921065338A