Quantcast
Channel: Math.NET Numerics
Viewing all 971 articles
Browse latest View live

New Post: new user question

$
0
0

Hi Christoph,

When I try your suggestion,

var a = new Double.DenseVector(newdouble[] {1,2,3});

I get the following error: "The type name 'DenseMatrix' does not exist in the type 'double'"

I guess this is what I expected since it does not know to use MathNet.Numerics.LinearAlgebra.Double.DenseVector.  It thinks it is System.Double.  I understand what Cuda has suggested but I wanted to know if there is any other alternative.

Thanks

John


New Post: new user question

$
0
0

Sorry, my mistake - that trick only actually works if you're inside the MathNet.Numerics.LinearAlgebra namespace. Please consider cuda's approach instead with an alias, or more general e.g.:

using DoubleLA = MathNet.Numerics.LinearAlgebra.Double;
using ComplexLA = MathNet.Numerics.LinearAlgebra.Complex;

var a = new DoubleLA.DenseMatrix(3,4);

Thanks,
Christoph

New Post: new user question

New Post: Iterative Solver Problem

$
0
0
var p3 = newdouble[,] { { 1, 1, 1 }, { 1, 2, 3 }, { 1, 3, 6 } };var pascal3 = new DenseMatrix(p3);var u = newdouble[] { 3, 1, 4 };var uVec = new DenseVector(u);var sl2 = new MathNet.Numerics.LinearAlgebra.Double.Solvers.Iterative.BiCgStab();var ans = sl2.Solve(pascal3, uVec);var sl3 = new MathNet.Numerics.LinearAlgebra.Double.Solvers.Iterative.MlkBiCgStab();
ans = sl3.Solve(pascal3, uVec);

Can anyone here tell why the answers using two methods are different?

New Post: Iterative Solver Problem

$
0
0

Just for reference, its the first one (BiCgStab) that is off, as verified with:

pascal3.LU().Solve(uVec);
pascal3.QR().Solve(uVec);

New Post: Iterative Solver Problem

$
0
0
cdrnet wrote:

Just for reference, its the first one (BiCgStab) that is off, as verified with:

 

pascal3.LU().Solve(uVec);
pascal3.QR().Solve(uVec);

 

Thank you, Christoph for your instant response. Do you know why the Iterative.BiCgStab() is off by such a large number?

New Post: Iterative Solver Problem

$
0
0

I actually don't know that much about our iterative solvers and how they (are supposed to) behave numerically myself, but some quick experiments show that it suddenly converges if we increase the iteration count stop criterium or modify the maximum residual of the residual stop criterium to anything other than its default (1e-12), e.g. 1e-10 or 1e-14:

var monitor = new Iterator(new IIterationStopCriterium[]
   {
       new IterationCountStopCriterium(1000),
       new ResidualStopCriterium(1e-13),
       new DivergenceStopCriterium(),
       new FailureStopCriterium()
   });

var sl2 = new BiCgStab(monitor);

Thanks,
Christoph 

NB: monitor.Status is set to CalculationConverged if it converged, but in the failing case above it is CalculationStoppedWithoutConvergence, indicating the failure.

Commented Issue: Performance of DescriptiveStatistics is questionable [5698]

$
0
0
I have a VERY large dataset (TBs in size) that I will be wanting to run against. I was testing against only 20 MBs of data and using the DescriptiveStatistics class. I noticed that performance was harsh when i used this class even if just asking for 1 or 2 types of stats. This would run the DescriptiveStatistics class over my aggregate contents in approx 104 seconds. (even just for the MEAN)

I then decided I should give the static class/ienumerable extensions a try, this shocked me in my evaluation of the exact same dataset, 69 milliseconds. (just MEAN)

I would like to suggest an update to the DescriptiveStatistics class. lazy load the statistics. this would increase performance drastically.

Thanks,


Comments: I think this issue can be closed, as the according github issue is fixed.

Commented Issue: Descriptive statistics needing two passes over the data [5670]

$
0
0
I guess the goal of descriptive statistics is to compute a whole bunch of stats in as few passes over the data as possible. It has proven very useful to me many times; the only slightly unsatisfactory thing I feel is that it computes the Median all the time. This particular pass seems to require access to all the data - in memory - at the same time. Not sure how we could change the API to be as elegant as it currently is but we might be able to give people the option as to what level of descriptive statistics they require. Not sure if people have any thoughts?
Comments: I think this issue can be closed, as the according github issue is fixed.

Commented Issue: True computation of online statistics [5686]

$
0
0
Great thank you,

In my project I used these references: maybe they will help

http://lingpipe-blog.com/2009/07/07/welford-s-algorithm-delete-online-mean-variance-deviation/

http://www.johndcook.com/standard_deviation.html

Best,

JB
Comments: I think this issue can be closed, as the according github issue is fixed.

Closed Issue: Descriptive statistics needing two passes over the data [5670]

$
0
0
I guess the goal of descriptive statistics is to compute a whole bunch of stats in as few passes over the data as possible. It has proven very useful to me many times; the only slightly unsatisfactory thing I feel is that it computes the Median all the time. This particular pass seems to require access to all the data - in memory - at the same time. Not sure how we could change the API to be as elegant as it currently is but we might be able to give people the option as to what level of descriptive statistics they require. Not sure if people have any thoughts?

Closed Issue: Performance of DescriptiveStatistics is questionable [5698]

$
0
0
I have a VERY large dataset (TBs in size) that I will be wanting to run against. I was testing against only 20 MBs of data and using the DescriptiveStatistics class. I noticed that performance was harsh when i used this class even if just asking for 1 or 2 types of stats. This would run the DescriptiveStatistics class over my aggregate contents in approx 104 seconds. (even just for the MEAN)

I then decided I should give the static class/ienumerable extensions a try, this shocked me in my evaluation of the exact same dataset, 69 milliseconds. (just MEAN)

I would like to suggest an update to the DescriptiveStatistics class. lazy load the statistics. this would increase performance drastically.

Thanks,


Commented Issue: Algorithms.LinearAlgebra.Acml disappeared [5720]

$
0
0
Algorithms.LinearAlgebra.Acml namesapace as well as several others - apart from MKL have disappeared in the latest version.
This means that native wrapper tests no longer build.
In general I must say that it is horrendously complicated to enable any non-managed BLAS engine.
It would be really nice if default download included at least one non-managed BLAS implementation - e.g. the reference one. As it stands, one has to spend huge amount of time obtaining pieces of software from various sources.
It also means that default (managed) implementation is several factors of magnitude slower than Matlab, R or the like when it comes to manipulating sizeable matrices.
Comments: I removed the ACML provider since ACML no longer supports 32-bit systems. I also removed the Goto provider since the Goto project is dead and was forked into OpenBLAS, but OpenBLAS currently doesn't build on Windows. The MKL provider will be available on NuGet with the 2.4 release of Math.NET Numerics. That should simplify things. I've been working on an ATLAS provider, but ran ran into a snag with the Windows build - an issue getting the full LAPACK package to build with ATLAS 3.10 (builds fine on Linux though). >This means that native wrapper tests no longer build. The tests should build with most recent code on GitHub.

New Post: 2D FFT

New Post: 2D FFT


Closed Issue: SparseVector.NonZerosCount [5721]

$
0
0
Please, could it be possible to add to the SparseVector property

public int NonZerosCount
{
get { return _storage.ValueCount; }
}

as it is in SparseMatrix?

Commented Issue: SparseVector.NonZerosCount [5721]

$
0
0
Please, could it be possible to add to the SparseVector property

public int NonZerosCount
{
get { return _storage.ValueCount; }
}

as it is in SparseMatrix?

Comments: Added to mainline

Closed Issue: complex eigenvalue decomposition bug [5694]

$
0
0
// Breakpoint before the decomposition shows the content of the first DenseMatrix in the array of dense matrices (index = [0] )
base {MathNet.Numerics.LinearAlgebra.Complex32.Matrix} = {(0.9275488, 0),(0, 0),(0, 0)(-0.9275488, 0),(0.9275488, 0),(0, 0)(0, 0),(-0.9275488, 0),(0.9275488, 0)}�

UserEvd eigVR = new UserEvd(mArrayOld[0]); // halts the program

Comments: Tracked over at GitHub: https://github.com/mathnet/mathnet-numerics/issues/11

Closed Issue: Unit tests fail using Mono 2.10 [5668]

$
0
0
The unit tests hang on the solvers (direct and iterative) and about 25 non-solver tests fail under Mono 2.10 on Ubuntu 10.10. Most are precision and culture problems, and a couple are due to differing hash code implementations.
Comments: Tracked over at GitHub: https://github.com/mathnet/mathnet-numerics/issues/12

Closed Issue: Add missing RandomShuffle to Combinatorics [5692]

$
0
0
Hi,

On the website

http://numerics.mathdotnet.com/combinatorics/

I saw there is a method to generate a combination of a list.

However I don't seem to find it in the code.

Am I overlooking something?

Best regards,

Ike
Comments: Tracked over at GitHub: https://github.com/mathnet/mathnet-numerics/issues/14
Viewing all 971 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>