0% found this document useful (0 votes)
4 views39 pages

Chapter 5

Chapter 5 outlines the implementation and testing strategies for the Rental Price Prediction Application using Agile methodologies like Scrum and Kanban. It emphasizes prototyping, modular development, continuous integration and deployment (CI/CD), and test-driven development (TDD) to enhance the application's functionality and user experience. The chapter also includes coding details for the front-end, showcasing the structure and components of the application.

Uploaded by

mogalaftab940
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views39 pages

Chapter 5

Chapter 5 outlines the implementation and testing strategies for the Rental Price Prediction Application using Agile methodologies like Scrum and Kanban. It emphasizes prototyping, modular development, continuous integration and deployment (CI/CD), and test-driven development (TDD) to enhance the application's functionality and user experience. The chapter also includes coding details for the front-end, showcasing the structure and components of the application.

Uploaded by

mogalaftab940
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

CHAPTER 5: IMPLEMENTATION & TESTING

Agile Development Methodology:


Employ an Agile development approach like Scrum or Kanban
to iteratively build and enhance the Rental Price Prediction
Application.
Break down the project into user stories, prioritize them
based on business value, and deliver working increments
regularly.
Conduct sprint reviews and retrospectives to gather feedback
and adapt the development process accordingly.
Prototyping and Rapid Iteration:
Utilize prototyping to swiftly develop and assess different
functionalities of the application.
Build rapid prototypes to validate technical feasibility and
user interface designs before proceeding with full-scale
development.
Iterate on prototypes based on user feedback to refine
features and enhance usability.
Modular Development Approach:
Adopt a modular approach to develop the application with
reusable components.
Define clear interfaces and dependencies between modules
to ensure easy integration and scalability.
Develop each module iteratively, focusing on well-defined
functionality and clear interfaces.

Continuous Integration and Deployment (CI/CD):


Implement CI/CD pipelines to automate code integration,
testing, and deployment processes.
Utilize version control systems like Git for effective
collaboration and code management.
Embrace DevOps practices to streamline workflows and
accelerate feature delivery.

Testing-Driven Development (TDD):


Emphasize testing-driven development by writing tests
before implementing new features.
Create unit tests, integration tests, and end-to-end tests to
validate application behavior.
Automate testing to ensure comprehensive coverage and
early detection of issues.

5.2 Coding Details And Code Efficiency:


Front-End:
Index.tsx

// use client
// @ts-nocheck
import Head from "next/head";
import Image from "next/image";
import Link from "next/link";
import { useState } from "react";

export default function Home() {


const [prediction, setPrediction] = useState("Get Predictions!");
const [features, setFeatures] = useState({
bedroom: 0.0,
layout_type: 0,
area: 0,
furnish_type: 0,
bathroom: 0,
city: 0,
agent: 0,
builder: 0,
owner: 0,
apartment: 0,
independent_floor: 0,
independent_house: 0,
penthouse: 0,
studio_apartment: 0,
villa: 0,
});
const getPredictions = async (e) => {
e.preventDefault();
const data = features;
console.log(features);
const res = await fetch("http://127.0.0.1:5000", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});
const json = await res.json();
console.log(json);
setPrediction(json.prediction);
};

const handleSubmit = async (e) => {


e.preventDefault();

// Call getPredictions function


};

return (
<>
<Head>
<title>Estate AI</title>
<meta
name="description"
content="Looking for the best rooms to rent? Let the AI help
you with your customized preferences!"
/>
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
{/* Header */}
<header className="flex justify-between bg-gradient-to-b
from-black to-transparent px-10 py-4 absolute top-0 left-0 right-0 z-
10">
<div className="header_left flex md:w-[50%] w-full justify-
center md:justify-start items-center gap-4">
<Image src="/logo.png" alt="Estate AI" width={40}
height={40} />
<p
className="text-white font-bold text-2xl
"
>
Estate AI
</p>
</div>
<div className="header_right md:flex hidden items-center
justify-end gap-10 w-[50%]">
<Link
className="text-white text-lg hover:text-blue-500
hover:cursor-pointer"
href="/"
>
<p>Home</p>
</Link>
<Link
className="text-white text-lg hover:text-blue-500
hover:cursor-pointer"
href="/about"
>
<p>About</p>
</Link>
<Link
className="text-white text-lg hover:text-blue-500
hover:cursor-pointer"
href="/about"
>
<p>GitHub</p>
</Link>
</div>
</header>

{/* Hero */}


<section
className="hero flex py-24 md:items-center items-end px-10
gap-4 md:h-[100vh] h-[70vh] relative"
style={{
backgroundImage: `url(/hero.png)`,
backgroundSize: "cover",
backgroundColor: "rgba(0,0,0,0.3)",
backgroundBlendMode: "overlay",
}}
>
<div className="heroLeft text-white">
<h1 className="md:text-6xl text-3xl font-bold md:w-[65%]
md:py-2 py-4">
Looking for the best rooms to rent in a{" "}
<span className="text-blue-500">Metro City</span>?
</h1>
<h2 className="text-xl md:w-[60%]">
Use our AI Model trainded over lakhs of data points to find
the
best price as per your requirements!
</h2>
<button className="border-blue-500 border-2 my-6
hover:bg-gradient-to-r hover:from-blue-600 hover:to-blue-500
transition-all ease-out duration-300 text-white font-bold py-2 px-10
rounded-full cursor-pointer">
<a href="#prediction">Find Best Price!</a>
</button>
</div>
<div className="bottom_gradient bg-gradient-to-t from-black
to-trasnparent absolute bottom-0 left-0 right-0 h-32"></div>
</section>

{/* Prediction Form */}


<section
id="prediction"
className="predictionForm flex md:flex-row flex-col-reverse
items-center justify-around py-24 bg-black text-white"
>
<div className="prediction_value md:text-left md:my-0 my-5
text-center">
<h1 className="text-4xl font-bold ">Predicted Price</h1>
<h2 className="text-blue-500 text-4xl font-bold">
₹ {Math.ceil(prediction)}
</h2>
</div>
<div className="prediction_form md:w-[50%] px-5 justify-
center flex flex-col items-center">
<h1 className="text-4xl font-bold text-center">
Let the AI help you find the best rooms!
</h1>
<p className="text-xl text-center md:w-[50%] md:my-4 mt-5
mb-8">
Fill in the form below to get the best rooms as per your
requirements
</p>
<form
onSubmit={(e) => {
getPredictions(e);
}}
className="flex flex-col items-center justify-center gap-4 w-
full"
>
<div className="group flex justify-between gap-10 w-full">
<div className="flex flex-col gap-2 w-[100%]">
<label className="text-lg font-bold">City</label>
<select
name="city"
value={features.property}
onChange={(e) =>
setFeatures({
...features,
[e.target.name]: parseInt(e.target.value),
})
}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Select" disabled selected>
Select
</option>
<option value="0">Ahmedabad</option>
<option value="1">Bangalore</option>
<option value="2">Chennai</option>
<option value="3">Delhi</option>
<option value="4">Hyderabad</option>
<option value="5">Kolkata</option>
<option value="6">Mumbai</option>
<option value="7">Pune</option>
</select>
</div>

<div className="flex flex-col gap-2 w-[100%]">


<label className="text-lg font-bold">Seller</label>
<select
onChange={(e) => {
console.log(e.target.selectedOptions[0].dataset.seller);
setFeatures({
...features,
[e.target.selectedOptions[0].dataset.seller]: 1,
});
}}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Agent" data-seller="agent">
Agent
</option>
<option value="Builder" data-seller="builder">
Builder
</option>
<option value="Owner" data-seller="owner">
Owner
</option>
</select>
</div>
</div>
<div className="group flex justify-between gap-10 w-full">
<div className="flex flex-col gap-2 w-full">
<label className="text-lg font-bold">Bedroom</label>
<select
value={features.bedroom}
onChange={(e) =>
setFeatures({
...features,
bedroom: parseInt(e.target.value),
})
}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Select" disabled selected>
Select
</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>
<div className="flex flex-col gap-2 w-full">
<label className="text-lg font-bold">Bathroom</label>
<select
value={features.bathroom}
onChange={(e) =>
setFeatures({
...features,
bathroom: parseInt(e.target.value),
})
}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Select" disabled selected>
Select
</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>
</div>
<div className="group flex justify-between gap-10 w-full">
<div className="flex flex-col gap-2 w-full">
<label className="text-lg font-bold">Area</label>
<input
type="number"
min={0}
placeholder="Area in sqft"
max={19000}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
value={features.area}
onChange={(e) =>
setFeatures({
...features,
area: parseFloat(e.target.value),
})
}
/>
</div>
<div className="flex flex-col gap-2 w-full">
<label className="text-lg font-bold">Furnish
Type</label>
<select
onChange={(e) =>
setFeatures({
...features,
furnish_type: parseInt(e.target.value),
})
}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Select" disabled selected>
Select
</option>
<option value="1">Semi-Furnished</option>
<option value="2">Unfurnished</option>
<option value="0">Furnished</option>
</select>
</div>
</div>

<div className="group flex justify-between gap-10 w-full">


<div className="flex flex-col gap-2 w-full">
<label className="text-lg font-bold">Property
Type</label>
<select
value={features.property}
onChange={(e) =>
setFeatures({
...features,
[e.target.selectedOptions[0].dataset.property]: 1,
})
}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Select" disabled selected>
Select
</option>
Apartment Independent Floor Independent House
Penthouse
Studio Apartment
<option value="Apartment" data-
property="apartment">
Apartment
</option>
<option
value="Independent House"
data-property="independent_house"
>
Independent House
</option>
<option
value="Independent Floor"
data-property="independent_floor"
>
Independent Floor
</option>
<option value="Penthouse" data-
property="penthouse">
Penthouse
</option>
<option
value="Studio Apartment"
data-property="studio_apartment"
>
Studio Apartment
</option>
</select>
</div>
<div className="flex flex-col gap-2 w-full">
<label className="text-lg font-bold">Layout
Type</label>
<select
onChange={(e) =>
setFeatures({
...features,
layout_type: parseInt(e.target.value),
})
}
className="border-2 bg-gray-800 border-gray-600 p-2
rounded-lg focus:outline-none focus:border-blue-500"
>
<option value="Select" disabled selected>
Select
</option>
<option value="1">BHK</option>
<option value="2">RK</option>
</select>
</div>
</div>
<input
type="submit"
value="Predict Price"
className="border-blue-500 border-2 my-2 hover:bg-
gradient-to-r hover:from-blue-600 hover:to-blue-500 transition-all
ease-out duration-300 text-white font-bold py-2 px-20 rounded-full
cursor-pointer"
/>
</form>
</div>
</section>

{/* Footer */}


<footer className="flex md:flex-row flex-col items-center
justify-center gap-4 w-full py-5 bg-black">
<div className="flex items-center justify-center gap-2">
<h1 className="text-lg font-bold text-white">Made with
by</h1>
<h1 className="text-lg font-bold text-blue-500">
<a
href="https://www.linkedin.com/in/theutkarshmishra/"
target="_blank"
>
Utkarsh Mishra
</a>
</h1>
</div>
<div className="md:hidden flex items-center justify-evenly
w-full">
<Link
className="text-white text-lg hover:text-blue-500
hover:cursor-pointer"
href="/"
>
<p>Home</p>
</Link>
<Link
className="text-white text-lg hover:text-blue-500
hover:cursor-pointer"
href="/about"
>
<p>About</p>
</Link>
<Link
className="text-white text-lg hover:text-blue-500
hover:cursor-pointer"
href="/about"
>
<p>GitHub</p>
</Link>
</div>
</footer>
</main>
</>
);
}

CSS:
@tailwind base;
@tailwind components;
@tailwind utilities;

html {
scroll-behavior: smooth;
}

/* custom scrollbar */
::-webkit-scrollbar {
width: 20px;
}

::-webkit-scrollbar-track {
background-color: black;
}
::-webkit-scrollbar-thumb {
background-color: #d6dee1;
border-radius: 20px;
border: 6px solid transparent;
background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
background-color: #a8bbbf;
}

Backend:
App.py:
from flask import Flask, request, jsonify
from pydantic import BaseModel
import pandas as pd
import joblib
from flask_cors import CORS, cross_origin

app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
class RequestFeatures(BaseModel):
bedroom: float
layout_type: int
area: float
furnish_type: int
bathroom: float
city: int
agent: int
builder: int
owner: int
apartment: int
independent_floor: int
independent_house: int
penthouse: int
studio_apartment: int
villa: int

with open('model.joblib', 'rb') as f:


model = joblib.load(f)

@app.route('/', methods=['POST'])
@cross_origin()
def predict():
req = RequestFeatures(**request.json)
df = pd.DataFrame([req.dict()], columns=req.dict().keys())
try:
print("Values in payload", req.dict(), [list(req.dict().values())])
res = model.predict([list(req.dict().values())])
return jsonify({"prediction": res[0]})
except Exception as e:
return jsonify({"error": str(e)})

details.ipynb:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

%matplotlib inline
#load the data

init_df = pd.read_csv('data.csv')
init_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 193011 entries, 0 to 193010
Data columns (total 10 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 seller_type 193011 non-null object
1 bedroom 193011 non-null float64
2 layout_type 193011 non-null object
3 property_type 193011 non-null object
4 locality 193011 non-null object
5 price 193011 non-null float64
6 area 193011 non-null float64
7 furnish_type 193011 non-null object
8 bathroom 193011 non-null float64
9 city 193011 non-null object
dtypes: float64(4), object(6)
memory usage: 14.7+ MB
init_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 193011 entries, 0 to 193010
Data columns (total 10 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 seller_type 193011 non-null object
1 bedroom 193011 non-null float64
2 layout_type 193011 non-null object
3 property_type 193011 non-null object
4 locality 193011 non-null object
5 price 193011 non-null float64
6 area 193011 non-null float64
7 furnish_type 193011 non-null object
8 bathroom 193011 non-null float64
9 city 193011 non-null object
dtypes: float64(4), object(6)
memory usage: 14.7+ MB
# I'll be doing visualization later, as I need to learn more about it!
plt.scatter(init_df.price,init_df.city)
<matplotlib.collections.PathCollection at 0x18925fe22a0>

#! Encoding Values
# Okay so there are 6 String feilds which we need to encode
#! For values like seller_type, city where they are not related we'll
use get_dummies
#* For values like furnish_type, layout_type where they can be
arranged as rank, as BHK > RK, we will use label encoder

import numpy as np
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import OrdinalEncoder
seller_type = pd.get_dummies(init_df.seller_type)
init_df = init_df.drop('seller_type', axis='columns')
init_df = pd.concat([init_df, seller_type], axis="columns")

e_property = pd.get_dummies(init_df.property_type)
init_df = init_df.drop('property_type', axis='columns')
init_df = pd.concat([init_df, e_property], axis='columns')
init_df.tail()

layout_oe = OrdinalEncoder(categories=[['RK', 'BHK']])


furnish_oe = OrdinalEncoder(categories=[["Unfurnished", "Semi-
Furnished", "Furnished"]])
city_oe = OrdinalEncoder(categories=[["Kolkata", "Ahmedabad",
"Pune", "Chennai", "Hyderabad", "Bangalore", "Delhi",
"Mumbai"]])

locality_encoder = LabelEncoder()
np.random.seed(42)

# Encode the layout_type, furnish_type, city, and locality columns


# init_df['layout_type'] =
layout_oe.fit_transform(init_df[['layout_type']])
init_df['city'] = city_oe.fit_transform(init_df[['city']])
init_df['layout_type'] =
layout_oe.fit_transform(init_df[['layout_type']])
init_df['furnish_type'] =
furnish_oe.fit_transform(init_df[['furnish_type']])
init_df.drop('locality', axis="columns")

init_df.head()
bedroom layout_type locality price area furnish_type
bathroom city AGENT BUILDER OWNER Apartment
Independent Floor Independent House Penthouse Studio
Apartment Villa
0 2.0 1.0 Bodakdev 20000.0 1450.0 2.0 2.0 1.0
False False True True False False False False False
1 1.0 0.0 CG Road 7350.0 210.0 1.0 1.0 1.0
False False True False False False False True False
2 3.0 1.0 Jodhpur 22000.0 1900.0 0.0 3.0 1.0
False False True True False False False False False
3 2.0 1.0 Sanand 13000.0 1285.0 1.0 2.0 1.0
False False True False False True False False False
4 2.0 1.0 Navrangpura 18000.0 1600.0 2.0 2.0
1.0 False False True False False True False False False
# * Now we need to repeat this, for this we better write a function
# TODO - Solve this error when using functions!
# !cannot access local variable 'init_df' where it is not associated
with a value
#! Note, I'm not removing the last dummy column, let's see how it
impacts the model i.e Linear Collinearilty Error or So it's called

# ? Find a way to export all the features, with their orignal values,
encoded values and their data type.
# One way to do this is make a set of unique values, then use that
set to create a dictionary of keys with values obtained by passing
the key in the encoder.

# schema = {}
# encoded_values = {
# "layout_type": layout_encoder,
# "furnish_type": furnish_encoder,
# "city": city_encoder,
# "locality": locality_encoder
#}

# for feature, encoder in encoded_values.items():


# unique_values = encoder.inverse_transform(
# init_df[feature].unique()) # get unique original values
# encoded_values = encoder.transform(unique_values) # encode
unique values
# # map original to encoded values
# schema[feature] = dict(zip(unique_values, encoded_values))

# # create an empty DataFrame to store the schema


# schema_df = pd.DataFrame(
# columns=['feature_name', 'original_value', 'encoded_value'])
# # iterate over each feature in the schema and its mapping of
original to encoded values
# for feature, mapping in schema.items():
# # iterate over each original value and its corresponding encoded
value
# rows = [{'feature_name': feature, 'original_value': original,
# 'encoded_value': encoded} for original, encoded in
mapping.items()]
# # concatenate the rows into the DataFrame
# schema_df = pd.concat([schema_df, pd.DataFrame(rows)],
ignore_index=True)

# schema_df.to_csv('schema.csv', index=False)
# Renaming the rows
init_df.rename(columns={"AGENT":"agent","OWNER":"owner",
"BUILDER":"builder", "Apartment":"apartment", "Independent
Floor":"independent_floor", "Independent
House":"independent_house", "Penthouse":"penthouse", "Studio
Apartment":"studio_apartment","Villa":"villa"}, inplace=True)
from sklearn.model_selection import train_test_split

init_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 193011 entries, 0 to 193010
Data columns (total 17 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 bedroom 193011 non-null float64
1 layout_type 193011 non-null float64
2 locality 193011 non-null object
3 price 193011 non-null float64
4 area 193011 non-null float64
5 furnish_type 193011 non-null float64
6 bathroom 193011 non-null float64
7 city 193011 non-null float64
8 agent 193011 non-null bool
9 builder 193011 non-null bool
10 owner 193011 non-null bool
11 apartment 193011 non-null bool
12 independent_floor 193011 non-null bool
13 independent_house 193011 non-null bool
14 penthouse 193011 non-null bool
15 studio_apartment 193011 non-null bool
16 villa 193011 non-null bool
dtypes: bool(9), float64(7), object(1)
memory usage: 13.4+ MB
Y = init_df['price']
X = init_df.drop(['price', 'locality'], axis='columns')
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.2)

from sklearn.ensemble import RandomForestRegressor


from sklearn.model_selection import GridSearchCV

# Hyperparameter tuning
#! Accuracy Before tuning 77.4%

n_estimators = [40,80,120]
max_features = [0.3, 0.6, 1.0]
max_depth = [2, 6, 8]
bootstrap = [True, False]

param_grid = {
'n_estimators': n_estimators,
'max_features': max_features,
'max_depth': max_depth,
'bootstrap': bootstrap
}

model = RandomForestRegressor()

rf_grid = GridSearchCV(model, param_grid=param_grid,cv=5,


verbose=2, n_jobs=-1)
rf_grid.fit(X_train, y_train)

best_model = rf_grid.best_estimator_
Fitting 5 folds for each of 54 candidates, totalling 270 fits
import joblib

with open('model.joblib', 'wb') as f:


joblib.dump(best_model, f, compress='lzma')

with open('model.joblib', 'rb') as f:


test = joblib.load(f)
res = test.score(X_test, y_test)
print(res)
result =
best_model.predict([[3,0,1234.9,2,2.0,2,2,0,1,0,0,0,1,0,0]])
print(result)
0.8035448230474086
[24340.44517313]
c:\Users\utkar\AppData\Local\Programs\Python\Python312\Lib\si
te-packages\sklearn\base.py:493: UserWarning: X does not have
valid feature names, but RandomForestRegressor was fitted with
feature names
warnings.warn(
requirements.txt:

annotated-types==0.6.0
asttokens==2.4.1
blinker==1.7.0
click==8.1.7
colorama==0.4.6
comm==0.2.2
contourpy==1.2.0
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
executing==2.0.1
Flask==3.0.2
Flask-Cors==4.0.0
fonttools==4.49.0
ipykernel==6.29.3
ipython==8.22.2
itsdangerous==2.1.2
jedi==0.19.1
Jinja2==3.1.3
joblib==1.3.2
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.8.3
matplotlib-inline==0.1.6
nest-asyncio==1.6.0
numpy==1.26.4
packaging==24.0
pandas==2.2.1
parso==0.8.3
pillow==10.2.0
platformdirs==4.2.0
prompt-toolkit==3.0.43
psutil==5.9.8
pure-eval==0.2.2
pydantic==2.6.4
pydantic_core==2.16.3
Pygments==2.17.2
pyparsing==3.1.2
python-dateutil==2.9.0.post0
pytz==2024.1
pywin32==306
pyzmq==25.1.2
scikit-learn==1.4.1.post1
scipy==1.12.0
six==1.16.0
stack-data==0.6.3
threadpoolctl==3.3.0
tornado==6.4
traitlets==5.14.2
typing_extensions==4.10.0
tzdata==2024.1
wcwidth==0.2.13
Werkzeug==3.0.1

schema.json:
{
"layout_type": {
"data-type": "integer",
"Encoding": {
"BHK": "1",
"RK": "0"
}
},
"furnish_type": {
"data-type": "integer",
"Encoding": {
"Furnished": "0",
"Semi-Furnished": "1",
"Unfurnished": "2"
}
}
}

5.3 Testing Approach:


Unit Testing:
Conduct unit testing to validate individual components or
modules of the Rental Price Prediction Application.
Write unit tests for each function or method to ensure
correctness and adherence to specifications.
Utilize testing frameworks like JUnit or PyTest to automate
unit test execution and achieve comprehensive code
coverage.
Integration Testing:
Perform integration testing to validate interactions and
interfaces between different modules or components.
Test integration points to ensure proper data exchange,
error handling, and synchronization.
Employ integration testing techniques such as top-
down or bottom-up to systematically integrate and test
system components.
System Testing:
Conduct system testing to evaluate the functionality and
behavior of the Rental Price Prediction Application as a
whole.
Test system-level functionalities such as prediction accuracy,
data retrieval, and user interface usability.
Use test scenarios and cases to simulate real-world usage and
validate performance under various conditions.
Performance Testing:
Perform performance testing to assess responsiveness,
scalability, and stability under expected load conditions.
Measure response times, throughput, and resource utilization
to identify performance bottlenecks and optimize as
necessary.
Conduct stress and load testing to determine system capacity
and limits under peak load scenarios.
Acceptance Testing:
Conduct acceptance testing to validate that the Rental Price
Prediction Application meets end-user and stakeholder
requirements.
Involve representatives from the target audience to perform
acceptance testing and provide feedback on usability and
functionality.
Use acceptance criteria derived from user stories and use
cases to verify alignment with business objectives.
Regression Testing:

Perform regression testing to ensure new code changes or


updates do not introduce regressions or unintended side
effects.
Re-run existing test cases to verify that previously
implemented functionalities continue to work as expected.
Automate regression testing to streamline the process and
maintain system stability during development iterations.

5.4 Modifications And Improvements:

You might also like