Machine Learning, Data Science, Machinelearningalgorithms, Ridge Regression, Python.
(sum(pred_training - y2))**2 # SSR = 54.47 pred_ridge = 2.9 + 0.55(x2) SSR_ridge = (sum(pred_ridge - y2))**2 # SSR_ridge = 16.81 SSR_ridge + 1(0.55**2) #17.112 We can see that Ridge works better than Normal Linear Regression. Now a Question may arise that how Ridge Regression selects values for