Generators#

multi_base(x: List[int | float] | ndarray, distribution_func: Callable, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate data based on a combination of distributions with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

distribution_funcCallable

The distribution function to be used to generate data.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_chi_squared(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-ChiSquareDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_exponential(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-ExponentialDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_folded_normal(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-FoldedNormalDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_gamma(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-GammaDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_gaussian(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-GaussianDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_half_normal(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-HalfNormalDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_laplace(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-LaplaceDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_log_normal(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-LogNormalDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multi_skew_normal(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, noise_level: float = 0.0, normalize: bool = False) ndarray[source]#

Generate multi-SkewNormalDistribution data with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples or numpy array containing the parameters for the required distribution.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data. Defaults to 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.

multiple_models(x: List[int | float] | ndarray, params: List[Tuple[int | float, ...]] | ndarray, model_list: list[str], noise_level: float = 0.0, normalize: bool = False, mapping_dict: Dict[str, Callable] | None = None) ndarray[source]#

Generate data based on a combination of different models with optional noise.

Parameters:
xUnion[List[int | float], np.ndarray]

Input array of values.

paramsUnion[List[Tuple[int | float, …]], np.ndarray]

List of tuples containing the parameters for each model.

model_listlist

A list of model names corresponding to the models to be used.

noise_levelfloat, optional

Standard deviation of the noise to be added to the data, by default 0.0.

normalizebool, optional

If True, the distribution is normalized so that the total area under the PDF equals 1. Defaults to False.

mapping_dict: dict, optional

A dictionary mapping between distribution names and their corresponding classes.

Returns:
np.array

Array of the same shape as \(x\), containing the evaluated values.