Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/362.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在给定分布方程的情况下用python生成数据集_Python_Python 3.x_Machine Learning_Normal Distribution - Fatal编程技术网

在给定分布方程的情况下用python生成数据集

在给定分布方程的情况下用python生成数据集,python,python-3.x,machine-learning,normal-distribution,Python,Python 3.x,Machine Learning,Normal Distribution,所以我有一个问题,我们要从给定的PDF p(X)生成数据 我计划创建一个给定的函数,从p(X)生成n个不同的样本 函数应具有以下参数: 创建_数据(dim=2(让它固定),_sam的num_,mean1[],cov1[],mean2[],cov2[]) 这将返回一个(N*2)数组 P(X) = Q1(X)p(x1/l1) + Q2(X)p(x1/l2) Q1(x),Q2(x) = are given (0.8/0.2 something) p(x1/l1), p(x1/l2) = are g

所以我有一个问题,我们要从给定的PDF p(X)生成数据

我计划创建一个给定的函数,从p(X)生成n个不同的样本

函数应具有以下参数:

创建_数据(dim=2(让它固定),_sam的num_,mean1[],cov1[],mean2[],cov2[])

这将返回一个(N*2)数组

P(X) =  Q1(X)p(x1/l1) + Q2(X)p(x1/l2)

Q1(x),Q2(x) = are given (0.8/0.2 something)
p(x1/l1), p(x1/l2) = are guassian distribution with mean and covariance matrix given