Making mir.random.ndvariable.multivariateNormalVar create bigger data sets than 2

kerdemdemir kerdemdemir at gmail.com
Tue Feb 27 09:23:49 UTC 2018


I need a classifier in my project.
Since it is I believe most easy to implement I am trying to 
implement logistic regression.

I am trying to do the same as the python example:  
https://beckernick.github.io/logistic-regression-from-scratch/

I need to data sets with which I will test.

This works(https://run.dlang.io/is/yGa4a0) :

	double[2] x1;
	Random* gen = threadLocalPtr!Random;
	
	auto mu = [0.0, 0.0].sliced;
	auto sigma = [1.0, 0.75, 0.75, 1].sliced(2,2);
	auto rv = multivariateNormalVar(mu, sigma);
	rv(gen, x1[]);
	writeln(x1);
	
But when I increase my data set size from double[2] to 
double[100] I am getting an assert :

mir-random-0.4.3/mir-random/source/mir/random/ndvariable.d(378): 
Assertion failure

which is:
assert(result.length == n);

How can I have a result vector which has size like 5000 something?

Erdemdem



More information about the Digitalmars-d-learn mailing list