how to plot multilinear regression graph in python

只愿长相守 提交于 2021-01-28 11:43:09

问题


How do I plot multilinear regression graph in python?

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model

df = pd.read_csv("C:/Users/SAAD FAKHAR/OneDrive/Desktop/reg.csv")
df

This is the screen shot of csv file:
enter image description here

reg=linear_model.LinearRegression()
reg.fit(df[['area','bedroom','age']],df.price)

来源:https://stackoverflow.com/questions/64050363/how-to-plot-multilinear-regression-graph-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!