Allow to optimize from a given matrix W