import torch


def _create_1d_regression_dataset(n: int = 100, seed: int = 0) -> torch.Tensor:
    """Creates a simple 1-D dataset of a noisy linear function.

    :param n: The number of datapoints to generate, defaults to 100
    :param seed: Random number generator seed, defaults to 0
    :return: A tensor that contains X values in [:, 0] and Y values in [:, 1]
    """
    torch.manual_seed(seed)
    x = torch.rand((n, 1)) * 10
    y = 0.2 * x + 0.1 * torch.randn(x.size())
    xy = torch.cat((x, y), dim=1)
    return xy