I am fitting a regression model on randomly generated X1,x2 and Y be the sum of x1, x2 but I am getting this error
ValueError: Found input variables with inconsistent numbers of samples: [2, 10000000]
Note:- I am doing this only for learning purposes
My code:-
X = np.random.random_integers(100000000,size=(2,10000000))
X=(X-(100000000/2))/(100000000/2) # Scaling [-1,1]
Y = X[0]+X[1]
regr = linear_model.LinearRegression()
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.2,
random_state=0)
regr.fit(X_train,Y_train)