def from_dataset(cls, dataset, constraints = (), **kwargs):
        """Construct a optimized inverse model from an existing dataset.
        A LWLR forward model is constructed by default.
        """
        fm = LWLRForwardModel(dataset.dim_x, dataset.dim_y, **kwargs)
        fm.dataset = dataset
        im = cls.from_forward(fm, constraints = constraints, **kwargs)
        return im