I need to fit a linear model to Wine Quality dataset. And then find MSE for each k-fold. Following is my code
regressor = LinearRegression()
regressor.fit(Features_train, Quality_train)
scores = cross_val_score(regressor, Features, Quality, cv=10,
scoring='mean_squared_error')
print scores
Problem here is that one or two values of MSE are negative. Following is the scores array:
[-0.47093648 -0.40001874 -0.46928925 -0.4317235 -0.37665658 -0.52359841
-0.40046081 -0.42944953 -0.36179521 -0.48792052]*
According to the formula, it shoud not be negative.