I am getting correct MSE values but wrong variance values, can u please help me out to get variance values correctly by using function from sklearn.model_selection

Thank you for the answer. I haven’t understood though, why it doesn’t work. In one case the variances get in the list all at once while in the other case (Dataquest’s implementation) they get in the list one by one. The final list should be the same in both cases and the np.var() method should afford the same result.