Found input variables with inconsistent numbers of samples: [4, 5] x = X[: 2 + target_idx] y = X[: 2 + target_idx + 1] - 원인: X와 Y의 차원이 달라서 그렇다. - 해결: numpy.array인 X의 인덱싱 과정에서 ,를 빼먹어서 슬라이싱된 상황이었다. ,를 작성해서 해결. x = X[:, 2 + target_idx] y = X[:, 2 + target_idx + 1] Expected 2D array, got 1D array instead: from sklearn import linear_model regr = linear_model.LinearRegression() regr.fit(x, y) - 원인: l..