- qspec.analyze. generate_collinear_points_cpp ( mean , cov , n_samples=None , n_accepted=None , seed=None , report=None , **kwargs )[source]
-
Randomly generate points $\vec{p}_i$ according to the given data vectors $\vec{\mu}_i\in\mathbb{R}^n$ and covariance matrices $\mathbf{\Sigma}_i\in\mathbb{R}^{n\times n}$, under the condition that they are aligned on a straight line. This function uses C++.
- Parameters:
-
- meanndarray
The data vectors $\vec{\mu}_i$. Must have shape
(k, n), wherekis the number of data points andnis the number of dimensions of each point.- covndarray
The covariance matrices $\mathbf{\Sigma}_i$ of the data vectors. Must have shape
(k, n, n). Usecovariance_matrixto construct covariance matrices.- n_samplesint_like | None
The maximum number of samples generated for each data point. If
None, it is 100,000.- n_acceptedint_like | None
The number of samples to be accepted for each data point. If
None, it is the maximum of 100,000 andn_samples.- seedint | None
A seed for the random number generator. If
None, a random seed is used.- reportbool | None
Whether to report the number of samples.
- kwargs
Additional keyword arguments are accepted for compatibility with
generate_collinear_points_pyand ignored.
- Returns:
-
- (p, n_accepted, n_samples)tuple[ndarray, int, int]
The generated data vectors $\vec{p}_i$ with shape
(n_accepted, k, n)and the number of accepted and generated samples.