{"id":9192,"date":"2022-12-16T20:00:06","date_gmt":"2022-12-16T14:30:06","guid":{"rendered":"http:\/\/myprojectideas.com\/?p=9192"},"modified":"2025-10-22T12:24:48","modified_gmt":"2025-10-22T12:24:48","slug":"house-price-prediction-using-python-machine-learning","status":"publish","type":"post","link":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/","title":{"rendered":"House Price Prediction Using Python | Machine Learning"},"content":{"rendered":"<h2>Introduction of the project<\/h2>\n<p>Today we will make a coding project on House Price Prediction Using Python. This machine learning model helps us to predict the price of a house on the basis of features like BHK, area, locality, etc. This model acts as a helping hand to the people engaged in the real estate industry. We have created this model through the dataset of Bangalore city, where the model predicts the price of a property on the basis of various features of the house in Bangalore.<\/p>\n<iframe loading=\"lazy\"  id=\"_ytid_99204\"  width=\"1080\" height=\"607\"  data-origwidth=\"1080\" data-origheight=\"607\" src=\"https:\/\/www.youtube.com\/embed\/Uu38sdVJ65g?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe>\n<p>&nbsp;<\/p>\n<h2>Objectives<\/h2>\n<ul>\n<li>The objective of building this machine learning model is to help clients in the real estate industry. This will help the people looking for a place to live to select the best property for living based on their own specifications and utility.<\/li>\n<li>To give the estimated price of a house according to the features so that users can get the best-fit property for their living purpose with their needs of the area, locality and rates accordingly.<\/li>\n<li>To act as an interface between the real estate industry and specific clients associated with it.<\/li>\n<\/ul>\n<h2>Requirements<\/h2>\n<p>1. Python Libraries<\/p>\n<ul>\n<li>Pandas<\/li>\n<li>NumPy<\/li>\n<li>Matplotlib<\/li>\n<\/ul>\n<p>2.\u00a0 <a href=\"https:\/\/jupyter.org\/\">Jupyter Notebook<\/a> or <a href=\"https:\/\/neptune.ai\/blog\/how-to-use-google-colab-for-deep-learning-complete-tutorial\">Google Colab<\/a><\/p>\n<p>3. Dataset<\/p>\n<h2>Source Code<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">import pandas as pd\r\n\r\nimport numpy as np\r\n\r\nfrom matplotlib import pyplot as plt\r\n\r\nimport matplotlib\r\n\r\n%matplotlib inline\r\n\r\nmatplotlib.rcParams[\"figure.figsize\"] = (20,10) # this is used to customize matplotlib at run time\r\n\r\n# All the figures and plots will be 20 inches in width and 10 inches in height\r\n\r\ndf= pd.read_csv('Bengaluru_House_Data.csv')\r\n\r\ndf\r\n\r\ndf.shape\r\n\r\ndf['area_type'].value_counts() # This will keep a count on total how many areas are presen\r\n\r\ndf2 = df.drop(['area_type' ,'availability' , 'balcony' , 'society' ] , axis = 'columns')\r\n\r\ndf2\r\n\r\ndf2.head()\r\n\r\ndf2.isnull() # checking if any missing value is present or not\r\n\r\ndf2.isnull().sum() # This shows the NA values\r\n\r\ndf3 = df2.dropna() # This will drop the all the NA Values\r\n\r\ndf3.isnull().sum()\r\n\r\ndf3.shape\r\n\r\ndf3['bhk'] = df3['size'].apply(lambda x : int(x.split(' ')[0])) # This we created a new coloumn named as bhk and only taken the\r\n\r\n# numerical part of the str\r\n\r\ndf3.head()\r\n\r\ndf3['bhk'].unique()\r\n\r\ndf3[df3.bhk&gt;20]\r\n\r\n# exploring total_sqft\r\n\r\ndf3['total_sqft'].unique()\r\n\r\ndf3['location'].value_counts\r\n\r\ndef is_float(x):\r\n\r\ntry:\r\n\r\nfloat(x)\r\n\r\nexcept:\r\n\r\nreturn False\r\n\r\nreturn True\r\n\r\ndf3[~df3['total_sqft'].apply(is_float)]\r\n\r\ndef convert_sqft_to_num(x):\r\n\r\ntokens = x.split('-')\r\n\r\nif len(tokens) == 2:\r\n\r\nreturn (float(tokens[0])+float(tokens[1]))\/2\r\n\r\ntry:\r\n\r\nreturn float(x)\r\n\r\nexcept:\r\n\r\nreturn None\r\n\r\ndf4 = df3.copy() # creating a new data frame\r\n\r\ndf4['total_sqft'] = df4['total_sqft'].apply(convert_sqft_to_num) # applying the function within our coloumn of our new data frame\r\n\r\ndf4.head()\r\n\r\ndf4.loc[30]\r\n\r\ndf4.head()\r\n\r\ndf5 = df4.copy()\r\n\r\n# now its time to create a coloumn of price per square feet as its important for real estate\r\n\r\ndf5['price_per_sqft'] = df5['price']*100000\/df5['total_sqft']\r\n\r\ndf5.head()\r\n\r\ndf5.location.unique()\r\n\r\nlen(df5.location.unique())\r\n\r\ndf5.location = df5.location.apply(lambda x : x.strip()) # this is to remove the irregularities in location text data\r\n\r\n# checking the number of data rows of different locations\r\n\r\nlocation_stats = df5.groupby('location')['location'].agg('count')\r\n\r\nlocation_stats\r\n\r\n# sorting in descending order\r\n\r\nlocation_stats = df5.groupby('location')['location'].agg('count').sort_values(ascending = False)\r\n\r\nlocation_stats\r\n\r\nlen(location_stats[location_stats&lt;=10]) # checking the number of locations with less than or equal to 10 data points\r\n\r\nlocation_stats_less_than_ten = location_stats[location_stats&lt;=10]\r\n\r\nlocation_stats_less_than_ten\r\n\r\ndf5.location = df5.location.apply(lambda x : 'other' if x in location_stats_less_than_ten else x)\r\n\r\nlen(df5.location.unique())\r\n\r\ndf5.head(10)\r\n\r\n# Outliers detection need some sort of domain knowledge ,so we set a threshold value(according to our domain knowledge) and\r\n\r\n# start comparing the values and removing the outliers\r\n\r\ndf5[df5.total_sqft\/df5.bhk&lt;300].head()\r\n\r\ndf5.shape\r\n\r\n# removing the anamolies of irregularities in the data!\r\n\r\ndf6 = df5[~(df5.total_sqft\/df5.bhk&lt;300)]\r\n\r\ndf6\r\n\r\ndf5.shape\r\n\r\ndf6.shape\r\n\r\ndf6.price_per_sqft.describe()\r\n\r\n# setting a threshold and considering only that values which will greater than (m-st) and smaller than (m+st)\r\n\r\ndef remove_pps_outliers(df):\r\n\r\ndf_out = pd.DataFrame()\r\n\r\nfor key, subdf in df.groupby('location'):\r\n\r\nm = np.mean(subdf.price_per_sqft)\r\n\r\nst = np.std(subdf.price_per_sqft)\r\n\r\nreduced_df = subdf[(subdf.price_per_sqft&gt;(m-st)) &amp; (subdf.price_per_sqft&lt;=(m+st))]\r\n\r\ndf_out = pd.concat([df_out,reduced_df],ignore_index=True)\r\n\r\nreturn df_out\r\n\r\ndf7 = remove_pps_outliers(df6)\r\n\r\ndf7.shape\r\n\r\ndf7\r\n\r\ndef plot_scatter_chart(df,location):\r\n\r\nbhk2 = df[(df.location==location) &amp; (df.bhk==2)]\r\n\r\nbhk3 = df[(df.location==location) &amp; (df.bhk==3)]\r\n\r\nmatplotlib.rcParams['figure.figsize'] = (15,10)\r\n\r\nplt.scatter(bhk2.total_sqft,bhk2.price,color='blue',label='2 BHK', s=50)\r\n\r\nplt.scatter(bhk3.total_sqft,bhk3.price,marker='+', color='green',label='3 BHK', s=50)\r\n\r\nplt.xlabel(\"Total Square Feet Area\")\r\n\r\nplt.ylabel(\"Price (Lakh Indian Rupees)\")\r\n\r\nplt.title(location)\r\n\r\nplt.legend()\r\n\r\n\r\n\r\n\r\nplot_scatter_chart(df7,\"Rajaji Nagar\")\r\n\r\ndf7.head(5)\r\n\r\n# now removing the outliers\r\n\r\ndef remove_bhk_outliers(df):\r\n\r\nexclude_indices = np.array([])\r\n\r\nfor location, location_df in df.groupby('location'):\r\n\r\nbhk_stats = {}\r\n\r\nfor bhk, bhk_df in location_df.groupby('bhk'):\r\n\r\nbhk_stats[bhk] = {\r\n\r\n'mean': np.mean(bhk_df.price_per_sqft),\r\n\r\n'std': np.std(bhk_df.price_per_sqft),\r\n\r\n'count': bhk_df.shape[0]\r\n\r\n}\r\n\r\nfor bhk, bhk_df in location_df.groupby('bhk'):\r\n\r\nstats = bhk_stats.get(bhk-1)\r\n\r\nif stats and stats['count']&gt;5:\r\n\r\nexclude_indices = np.append(exclude_indices, bhk_df[bhk_df.price_per_sqft&lt;(stats['mean'])].index.values)\r\n\r\nreturn df.drop(exclude_indices,axis='index')\r\n\r\ndf8 = remove_bhk_outliers(df7)\r\n\r\n# df8 = df7.copy()\r\n\r\ndf8.shape\r\n\r\nplot_scatter_chart(df8 , 'Rajaji Nagar') # plotting the difference after removing the outlier\r\n\r\n# Sort off normal distribution\r\n\r\nplt.hist(df8.price_per_sqft,rwidth=0.8)\r\n\r\nplt.xlabel(\"Price Per Square Feet\")\r\n\r\nplt.ylabel(\"Count\")\r\n\r\ndf8.bath.unique()\r\n\r\ndf8[df8.bath&gt;10]\r\n\r\nplt.hist(df8.bath , rwidth = 0.8)\r\n\r\nplt.xlabel(\"Number Of Bathrooms\")\r\n\r\nplt.ylabel(\"Counts\")\r\n\r\ndf8[df8.bath&gt;df8.bhk+2]\r\n\r\ndf9 = df8[df8.bath&lt;df8.bhk+2]\r\n\r\ndf9.shape # we have only considered the data in which bathrooms are less than the bhk and setted in a new data frame\r\n\r\n# Now dropping all the necessary coloumns for training and testing process\r\n\r\ndf10 = df9.drop(['size' , 'price_per_sqft'] , axis = 'columns')\r\n\r\ndf10.head(5)\r\n\r\ndummies = pd.get_dummies(df10.location) # as location is the text data so we need to convert it into numerical so that our model\r\n\r\n# could handle the data\r\n\r\ndummies.head(3)\r\n\r\n# this is one hot encoding\r\n\r\ndf11 = pd.concat([df10 , dummies.drop('other' , axis = 'columns') ] , axis = 'columns')\r\n\r\ndf11.head(5)\r\n\r\ndf12 = df11.drop('location' , axis = 'columns')\r\n\r\ndf12\r\n\r\ndf12.shape\r\n\r\nX = df12.drop('price' , axis = 'columns')\r\n\r\nX.head()\r\n\r\n# Now our dataset is ready , we have training and testing variables\r\n\r\nfrom sklearn.model_selection import train_test_split\r\n\r\nX_train , X_test , y_train , y_test = train_test_split(X,Y,test_size=0.2,random_state=10)\r\n\r\nfrom sklearn.linear_model import LinearRegression\r\n\r\nlr_clf = LinearRegression()\r\n\r\nlr_clf.fit(X_train , y_train)\r\n\r\nlr_clf.score(X_test , y_test)\r\n\r\n# The score of this algorithm is 84 percent which is quite decent\r\n\r\n# Using K-fold cross validation\r\n\r\n# This is a technique which allows us to decide which machine learning\r\n\r\n# algorithm would be the best for our dataset\r\n\r\nfrom sklearn.model_selection import ShuffleSplit\r\n\r\nfrom sklearn.model_selection import cross_val_score\r\n\r\ncv = ShuffleSplit(n_splits = 5 , test_size = 0.2 , random_state = 0)\r\n\r\ncross_val_score(LinearRegression() , X , Y , cv=cv)\r\n\r\n# AS we can see that we are getting majority of times our scores to be above 80 percent\r\n\r\n# So we can move ahead with LinearRegression\r\n\r\n# As we can see that the Linear Regression algorithm gives us the score above 80 percent\r\n\r\n# But we need to check the score in some more Regression algorithms\r\n\r\n# We will do that using gridsearchcv\r\n\r\nfrom sklearn.model_selection import GridSearchCV\r\n\r\nfrom sklearn.linear_model import Lasso\r\n\r\nfrom sklearn.tree import DecisionTreeRegressor\r\n\r\ndef find_best_model_using_gridsearchcv(X,y):\r\n\r\nalgos = {\r\n\r\n'linear_regression' : {\r\n\r\n'model': LinearRegression(),\r\n\r\n'params': {\r\n\r\n'normalize': [True, False]\r\n\r\n}\r\n\r\n},\r\n\r\n'lasso': {\r\n\r\n'model': Lasso(),\r\n\r\n'params': {\r\n\r\n'alpha': [1,2],\r\n\r\n'selection': ['random', 'cyclic']\r\n\r\n}\r\n\r\n},\r\n\r\n'decision_tree': {\r\n\r\n'model': DecisionTreeRegressor(),\r\n\r\n'params': {\r\n\r\n'criterion' : ['mse','friedman_mse'],\r\n\r\n'splitter': ['best','random']\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\nscores = []\r\n\r\ncv = ShuffleSplit(n_splits=5, test_size=0.2, random_state=0)\r\n\r\nfor algo_name, config in algos.items():\r\n\r\ngs = GridSearchCV(config['model'], config['params'], cv=cv, return_train_score=False)\r\n\r\ngs.fit(X,y)\r\n\r\nscores.append({\r\n\r\n'model': algo_name,\r\n\r\n'best_score': gs.best_score_,\r\n\r\n'best_params': gs.best_params_\r\n\r\n})\r\n\r\nreturn pd.DataFrame(scores,columns=['model','best_score','best_params'])\r\n\r\nfind_best_model_using_gridsearchcv(X,Y)\r\n\r\nX.columns\r\n\r\ndef predict_price(location,sqft,bath,bhk):\r\n\r\nloc_index = np.where(X.columns==location)[0][0]\r\n\r\nx = np.zeros(len(X.columns))\r\n\r\nx[0] = sqft\r\n\r\nx[1] = bath\r\n\r\nx[2] = bhk\r\n\r\nif loc_index &gt;= 0:\r\n\r\nx[loc_index] = 1\r\n\r\nreturn lr_clf.predict([x])[0]\r\n\r\npredict_price('1st Phase JP Nagar',1000, 2, 2)<\/pre>\n<h2>Explanation of the Code<\/h2>\n<p>1. Initially, we imported all the necessary libraries that will be required for this prediction model and loaded our dataset for analysis.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18108 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture1-1.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"355\" \/><\/p>\n<p>2. After importing the necessary python libraries, we perform a cleaning of the dataset.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18107 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture2-1.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"394\" \/><\/p>\n<p>3. Checking the null values and accordingly dropping them to clean the dataset further.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18106 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture3-2.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"303\" \/><\/p>\n<p>4. Once the dataset has been cleaned, then we start detecting the outliers.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18105 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture4-2.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"416\" \/><\/p>\n<p>5. Now, we have used the <strong>matplotlib<\/strong> library to visualize our dataset.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18104 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture5-2.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"386\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18102 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture6-2.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"406\" \/><\/p>\n<p>6. Next is the Train Test Split phase and using the <a href=\"https:\/\/machinelearningmastery.com\/k-fold-cross-validation\/\">K-fold cross-validation<\/a> to select the best algorithms.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18101 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture7.webp\" alt=\"House Price Prediction Using Python\" width=\"602\" height=\"398\" \/><\/p>\n<h2>Output<\/h2>\n<p>Finally, the house price prediction using python model is ready with a predict function which will predict the price of a house on the basis of given parameters passed in the predict function accordingly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-18100 size-full\" src=\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2022\/12\/Picture8.webp\" alt=\"House Price Prediction Using Python\" width=\"586\" height=\"470\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p><a id=\"post-9192-_heading=h.gjdgxs\"><\/a> This machine learning model of House Price Prediction Using Python helps the clients to select the best property according to their own utility and demand as this model predicts the price of the house on the basis of features like BHK, area in square feet, locality, etc. This coding project can serve as a helping hand in the real estate industry and can make the process of buying a house in a specific area accessible.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This machine learning model helps us to predict the price of a house based on features like BHK, area, locality, etc.<\/p>\n","protected":false},"author":1,"featured_media":9208,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-9192","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding-projects"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>House Price Prediction Using Python | Machine Learning - RUDE LABS<\/title>\n<meta name=\"description\" content=\"This machine learning model, house price prediction using python, helps us to predict the price of a house based on features like BHK, area, locality, etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"House Price Prediction Using Python | Machine Learning - RUDE LABS\" \/>\n<meta property=\"og:description\" content=\"This machine learning model, house price prediction using python, helps us to predict the price of a house based on features like BHK, area, locality, etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"RUDE LABS\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-16T14:30:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-22T12:24:48+00:00\" \/>\n<meta name=\"author\" content=\"rudelabs.ai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rudelabs_in\" \/>\n<meta name=\"twitter:site\" content=\"@rudelabs_in\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rudelabs.ai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\"},\"author\":{\"name\":\"rudelabs.ai\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894\"},\"headline\":\"House Price Prediction Using Python | Machine Learning\",\"datePublished\":\"2022-12-16T14:30:06+00:00\",\"dateModified\":\"2025-10-22T12:24:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\"},\"wordCount\":416,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Coding Projects\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\",\"name\":\"House Price Prediction Using Python | Machine Learning - RUDE LABS\",\"isPartOf\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2022-12-16T14:30:06+00:00\",\"dateModified\":\"2025-10-22T12:24:48+00:00\",\"description\":\"This machine learning model, house price prediction using python, helps us to predict the price of a house based on features like BHK, area, locality, etc.\",\"breadcrumb\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rudelabs.ai\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"House Price Prediction Using Python | Machine Learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#website\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/\",\"name\":\"RUDE LABS\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rudelabs.ai\/blogs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\",\"name\":\"RUDE LABS\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp\",\"contentUrl\":\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp\",\"width\":2459,\"height\":414,\"caption\":\"RUDE LABS\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/rudelabs_in\",\"https:\/\/www.linkedin.com\/company\/ru-delabs\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894\",\"name\":\"rudelabs.ai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g\",\"caption\":\"rudelabs.ai\"},\"sameAs\":[\"https:\/\/rudelabs.ai\/blogs\"],\"url\":\"https:\/\/rudelabs.ai\/blogs\/author\/rudelabs-ai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"House Price Prediction Using Python | Machine Learning - RUDE LABS","description":"This machine learning model, house price prediction using python, helps us to predict the price of a house based on features like BHK, area, locality, etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/","og_locale":"en_US","og_type":"article","og_title":"House Price Prediction Using Python | Machine Learning - RUDE LABS","og_description":"This machine learning model, house price prediction using python, helps us to predict the price of a house based on features like BHK, area, locality, etc.","og_url":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/","og_site_name":"RUDE LABS","article_published_time":"2022-12-16T14:30:06+00:00","article_modified_time":"2025-10-22T12:24:48+00:00","author":"rudelabs.ai","twitter_card":"summary_large_image","twitter_creator":"@rudelabs_in","twitter_site":"@rudelabs_in","twitter_misc":{"Written by":"rudelabs.ai","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#article","isPartOf":{"@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/"},"author":{"name":"rudelabs.ai","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894"},"headline":"House Price Prediction Using Python | Machine Learning","datePublished":"2022-12-16T14:30:06+00:00","dateModified":"2025-10-22T12:24:48+00:00","mainEntityOfPage":{"@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/"},"wordCount":416,"commentCount":0,"publisher":{"@id":"https:\/\/rudelabs.ai\/blogs\/#organization"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage"},"thumbnailUrl":"","articleSection":["Coding Projects"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/","url":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/","name":"House Price Prediction Using Python | Machine Learning - RUDE LABS","isPartOf":{"@id":"https:\/\/rudelabs.ai\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage"},"thumbnailUrl":"","datePublished":"2022-12-16T14:30:06+00:00","dateModified":"2025-10-22T12:24:48+00:00","description":"This machine learning model, house price prediction using python, helps us to predict the price of a house based on features like BHK, area, locality, etc.","breadcrumb":{"@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/rudelabs.ai\/blogs\/house-price-prediction-using-python-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rudelabs.ai\/blogs\/"},{"@type":"ListItem","position":2,"name":"House Price Prediction Using Python | Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/rudelabs.ai\/blogs\/#website","url":"https:\/\/rudelabs.ai\/blogs\/","name":"RUDE LABS","description":"","publisher":{"@id":"https:\/\/rudelabs.ai\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rudelabs.ai\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rudelabs.ai\/blogs\/#organization","name":"RUDE LABS","url":"https:\/\/rudelabs.ai\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp","contentUrl":"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp","width":2459,"height":414,"caption":"RUDE LABS"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/rudelabs_in","https:\/\/www.linkedin.com\/company\/ru-delabs\/"]},{"@type":"Person","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894","name":"rudelabs.ai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g","caption":"rudelabs.ai"},"sameAs":["https:\/\/rudelabs.ai\/blogs"],"url":"https:\/\/rudelabs.ai\/blogs\/author\/rudelabs-ai\/"}]}},"_links":{"self":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/9192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/comments?post=9192"}],"version-history":[{"count":1,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/9192\/revisions"}],"predecessor-version":[{"id":18109,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/9192\/revisions\/18109"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/media?parent=9192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/categories?post=9192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/tags?post=9192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}