This dataset can be used to predict hosing prices in Australia. This dataset can be used to find relationships between housing prices and location. This dataset can be used to find relationships between housing prices and features such as size, number of bedrooms, and number of bathrooms
Hint: RealEstateAU_1000_Samples.csv file
# Step 1: Load and Explore the Dataset
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Load the dataset
df = pd.read_csv(r"C:\Users\ahlad\Downloads\JNTUH_ML_DL_assignment_2(1).zip")
df
# Drop any duplicates
df.drop_duplicates(inplace=True)
# Check for missing values and handle them accordingly
print(df.isnull().sum())
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, LabelEncoder
from sklearn.linear_model import LinearRegression, Ridge, Lasso
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor
from sklearn.svm import SVR
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
# Explore the dataset
print(df.head()) # Display the first few rows
print(df.info()) # Summary of the dataset