def objective(x, y, x_train, y_train, private_estimator, parent_model, params):
        """Objective function which we seek to minimise"""

        model = sklearn.base.clone(parent_model.model, safe=True)
        model.fit(np.vstack((x_train, x)), np.hstack((y_train, y)))

        residual = 0.0

        for param in params:
            residual += np.sum((model.__getattribute__(param) - private_estimator.model.__getattribute__(param)) ** 2)

        return residual
Objective function which we seek to minimise
art/attacks/inference/reconstruction/white_box.py