You can use the following one-liner code to compute MSE using predicted probabilities and true labels of the data.
>>> import numpy as np>>> preds=np.array([0.43,0.98,0.67,0.87,0.34,0.45])>>> y_true = np.array([1,0,1,1,0,0])>>> mse=(1/len(preds))*np.sum(np.square(preds-y_true))>>> mse0.2881999999999999