I am using linear regression algorithm for a data set. And trying to compute confusion matrix between y_pred and y_test. I am getting
"ValueError : continuous is not supported" error.
I have included the code below. Help to solve this problem.
x = data_set.iloc[:, :-1].values y = data_set.iloc[:, 7].values x_train, x_test, y_train, y_test = train_test_split(x, y, test_size = 0.25, random_state = 0) from sklearn.linear_model import LinearRegression from sklearn.metrics import confusion_matrix regression = LinearRegression() regression.fit(x_train, y_train) y_pred = regression.predict(x_test) cm = confusion_matrix(y_test, y_pred)