You are viewing a single comment's thread. Return to all comments →
Multiple Linear Regression: Predicting House Prices Incase you need some help.
import numpy as np from sklearn.linear_model import LinearRegression F, N = map(int, input().split()) data = [list(map(float, input().split())) for i in range(N)] data = np.array(data) X_train, y_train = data[:, :-1], data[:, -1] T = int(input()) X_test = [list(map(float, input().split())) for i in range(T)] X_test = np.array(X_test) model = LinearRegression() model.fit(X_train, y_train) predictions = model.predict(X_test) for result in predictions: print(round(result, 2))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Multiple Linear Regression: Predicting House Prices
You are viewing a single comment's thread. Return to all comments →
Multiple Linear Regression: Predicting House Prices Incase you need some help.