python回归预测_用python回归预测房屋价格

本文介绍了如何使用Python进行回归预测,以预测房屋价格。通过深入探讨机器学习中的逻辑回归和深度学习方法,文章详细阐述了数据预处理、模型训练和评估的全过程。
摘要由CSDN通过智能技术生成

python回归预测

Online property companies offer valuations of houses using machine learning techniques. This report aims to predict house sales in King County, Washington State, USA using Multiple Linear Regression (MLR). The dataset consisted of historic data of houses sold between May 2014 to May 2015. We will predict the sales of houses in King County with an accuracy of at least 75–80% and understand which factors are responsible for higher property value — $650K and above.

在线房地产公司使用机器学习技术对房屋进行估价。 本报告旨在使用多元线性回归(MLR)预测美国华盛顿州金县的房屋销售。 该数据集由2014年5月至2015年5月之间售出的房屋的历史数据组成。我们将预测金县的房屋销售,其准确性至少为75–80%,并了解哪些因素导致了更高的房屋价值(65万美元和以上。

The dataset consists of house prices from King County an area in the US State of Washington, this data also covers Seattle. The dataset was obtained from Kaggle. This data was published/released under CC0: Public Domain. Unfortunately, the user has not indicated the source of the data. Please find the citation and database description in the Glossary and Bibliography. The dataset consisted of 21 variables and 21613 observations.

该数据集包含美国华盛顿州金县的房价,该数据还涵盖西雅图。 该数据集是从Kaggle获得的 此数据在CC0 :公共领域下发布/发行 。 不幸的是,用户没有指出数据的来源。 请在术语表和参考书目中找到引文和数据库描述。 该数据集由21个变量和21613个观测值组成。

Doing a small basic data exploration analysis on this project. First of all, we need to install the libraries used in this project. The first library to install is pandas for reading data files and NumPy for numerical analysis.

在这个项目上做一个小的基本数据探索分析。 首先,我们需要安装该项目中使用的库。 第一个要安装的库是用于读取数据文件的熊猫和用于数值分析的NumPy

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import warnings
warnings.filterwarnings('ignore')

Matplotlib is a plotting library for the Python programming and provides an object-oriented API for embedding plots into applications. Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program. For reading the data set file first, create a data frame variable and call read_csv of pandas for importing the file from the local location on the computer.

Matplotlib是用于Python编程的绘图库,并提供用于将绘图嵌入到应用程序中的面向对象的API。 警告信息在那里 ,提醒一些条件的用户在程序中是非常有用的情况下,通常发出的。 要首先读取数据集文件,请创建一个数据框变量,然后调用pandas的read_csv从计算机上的本地位置导入文件。

house_df = pd.read_csv("housedata.csv")

The housedata is a file name which is a type of CSV ( comma separated values) and house_df is a variable name in which we assigned file to this variable. To know the shape of the data frame by using the shape method.

housedata是一个文件名,它是CSV(逗号分隔值)的一种类型, house_df是一个变量名,在其中我们将文件分配给该变量。 通过使用shape方法了解数据框的形状。

print(house_df.shape)
  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值