def from_dataset(cls, dataset, **kwargs):
        """Construct a Nearest Neighbor forward model from an existing dataset."""
        m = cls(dataset.dim_x, dataset.dim_y, **kwargs)
        m.dataset = dataset
        return m
Construct a Nearest Neighbor forward model from an existing dataset.