jasmine.datasets.generate_regression
- jasmine.datasets.generate_regression(n_samples=100, n_features=20, n_informative=10, noise=0.0, bias=0.0, shuffle=True, coef=False, random_state=None)[source]
Generate a random regression problem with JAX.
This function creates a dataset where the output is a linear combination of a subset of the input features, with optional Gaussian noise.
- Parameters:
n_samples (int) – The number of samples to generate.
n_features (int) – The total number of features.
n_informative (int) – The number of features that are actually used to generate the output. The rest are noise.
noise (float) – The standard deviation of the Gaussian noise added to the output.
bias (float) – The bias term (intercept) in the underlying linear model.
shuffle (bool) – Whether to shuffle the features and informative indices. If False, the informative features will always be the first n_informative columns.
coef (bool) – If True, the ground truth coefficients and bias are returned.
random_state (int, optional) – Seed for the random number generator for reproducibility. If None, a random seed is used.
- Returns:
- By default, returns (X, y).
If coef is True, returns (X, y, ground_truth_coefficients).
- Return type: