lpspline.datasets.load_by_dataset#
- lpspline.datasets.load_by_dataset(samples: int = 1000, type: str = 'linear') Tuple[DataFrame, Series][source]#
Generate a synthetic dataset for demonstrating LPSpline features including group effects.
- Parameters:
samples (int, default=1000) – Number of samples to generate.
type (str, default='cubic') – Type of structural relationship for y. Options include: ‘linear’, ‘cubic’, ‘cyclic’.
- Returns:
X (pl.DataFrame) – A DataFrame containing the predictive feature ‘x’ and grouping structure ‘by’.
y (pl.Series) – The response Target series.