Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

INPLANT TRAINING REPORT

ON
“Python Internship ”

Submitted by
Nayan Dipak Das (2214490142)

In the Partial Fulfilment for The Award of The


Diploma In
INFORMATION TECHNOLOGY

UNDER MENTORSHIP OF
Mr. Akshay Gaikwad

Somayya Polytechnic Chandrapur

MAHARASHTRA STATE BOARD OF


TECHNICALEDUCATION

ACADEMIC YEAR 2023-24

1
Maharashtra State
Board of Technical Education
Certificate of Completion
Of Industrial Training
(By respective Head of the Institute & Head of the Department)

This is to certify that Mr. Nayan Dipak Das with Enrollment No. 2214490142 has
successfully completed Industrial Training in Python Technology.
From 03-06-2024 to 13-07-2024 for partial fulfilment towards completion of Diploma in
Computer Science from V2V EdTech LLP.
Institute Code 1449

2
Evaluation Sheet for ESE of Industrial Training by Mentor and Industry Personnel

Name of Student : Nayan Dipak Das Enrollment No. 2214490142


Name of Programme: Python internship
Semester: Fifth
Course Title: Industrial Training Code: 1449
Name of Industry: V2V EdTech LLP

Course Outcomes Achieved


a).Communicate effectively (verbal as well as written) the work carried out.
b).Prepare and present the report of the work carried out.
c).Exercise time management and safety in the work environment.
d).Working in a team.
e).Demonstrate various quality assurance.
f).Exhibit the work carried out.

Industrial Training Presentation Viva Total Marks


Report (25 Marks) (25 Marks) (25 Marks) (75 Marks)

Comments/Suggestions about team work/ leadership/inter-personal


communication(if any)

………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………

Signature- Signature-

Name of the Internal/Mentor Name of the External Examiner


(Industry Personnel)

3
Somayya Polytechnic Chandrapur

Institute Vision:
To create competent technical manpower to cater Industrial and Societal needs.

Institute Mission:
We are committed to-
● Provide an environment that values and encourages knowledge
acquisitions with effective curriculum implementation.
● Maintain well equipped laboratories to develop industrial competenciesamong the
students.
● Empower and motivate faculties towards building their domain expertisein
technology and management.
● Groom all round personality of students towards leadership, self-
employment and lifelong learning.
● Promote Industry Institute Interaction through training and placementservices,
continuing education programs, consultancy & Technical services etc. for socio-
economic development.

4
INFORMATION TECHNOLOGY DEPARTMENT

Departmental Vision:
To develop technical manpower in Information Technology by adapting rapid technological
advancement.

Departmental Mission:
We are committed to-
M1: Provide hands on skills with well-equipped laboratories.

M2: Train faculty & staff to adapt changing technology.


M3: Develop IT professionals with entrepreneurial skills.
M4: Inculcate ethical values, honesty, equity, women empowerment and safety.

Program Educational Objectives (PEOs):

PEO 1: Provide socially responsible, environment solutions to information technology related broad
based problems adapting professional ethics.

PEO 2: Adapt state-of-the-art of Information Technology techniques to work in multi-disciplinary


work environment.

PEO 3: Solve broad-based problems individually and as a team member communicating effectively in
the world of works.

5
Somayya Polytrchnic Chandrapur
At. Chandrapur, Dist. Chandrapur
Chandrapur pin code -442402

CERTIFICATE

This is to certify that Mr. Nayan Dipak Das Enrollment No. 2214490142 of Third Year Information
Technology student from Government Polytechnic Thane Institute has successfully completed Industrial
Training, entitled "Python internship” of fifth Semester having title Python Technology, from duration
03 June 2024 to 13 July 2024 (06 weeks), in partial fulfillment of the requirement for diploma in
Information Technology during the academic year 2024-2025.

Prof. Akshay Gaikwad Prof. A.R.Khuje


MENTOR HEAD OF DEPARTMENT

INTERNAL EXAMINAR EXTERNAL EXAMINAR

Dr. M. Z. Sheikh
PRINCIPAL

6
ABSTRACT

The Boston Housing Analysis project is designed to assist users in finding the best house property based
on their specific requirements. This project combines machine learning for backend processing and web
development technologies like HTML and CSS for frontend development. The application takes user inputs
such as the number of bedrooms, bathrooms, house size, and approximate price to recommend the most
suitable property from the dataset.

7
ACKNOWLEDGEMENT
I would like to express my gratitude to my faculty members and mentors at Somayya Polytechnic
Chandrapur for their invaluable guidance and support throughout the development of this project. Special
thanks to my project supervisor for their constant encouragement and insightful feedback. I also thank
my family and friends for their unwavering support and understanding.

8
TABLE OF CONTENTS

CHAPTER NO. CHAPTER NAME PAGE


NO.
ABSTRACT 07
ACKNOWLEDGEMENT 08
1. Introduction 10

2. Objective 11

3. Backend development 12 - 13

4. Frontend Development 14

5. Code 15 – 19

6. Output 20

7. Conclusion 21

8. References 22

9
1. Introduction
The Boston Housing Analysis project is an innovative solution designed to assist users in finding the
most suitable house property based on their specific requirements. This project integrates advanced
machine learning techniques with web development to provide a seamless user experience. By analyzing
user inputs such as the number of bedrooms, bathrooms, house size in square feet, and price, the project
aims to predict and present the best matching property from the available dataset.

The core of the project is built using Python for backend processing and data analysis. Libraries such as
Pandas and NumPy are employed for data preprocessing and manipulation, while Scikit-Learn is used for
implementing the machine learning model. The Nearest Neighbours algorithm is specifically chosen for
its efficiency in finding the closest match based on the provided criteria.
To create a user-friendly interface, HTML and CSS are used for the frontend development. Flask, a
lightweight web framework for Python, facilitates the integration between the backend and frontend,
allowing for smooth data flow and interaction.

This project not only showcases the practical application of machine learning in real estate but also
emphasizes the importance of data preprocessing, feature engineering, and model training in building
robust predictive systems. The Boston Housing Analysis project serves as a comprehensive example of
how technology can be leveraged to make informed decisions in the housing market, ultimately helping
users find their ideal home based on personalized criteria.

10
2. Objective
The primary objective of the Boston Housing Analysis project is to develop a robust and user-friendly platform
that assists individuals in finding the most suitable house properties based on their specific requirements. This
objective encompasses several key goals:

1. Data Integration and Preprocessing: To accurately process and integrate diverse datasets containing
information on various house properties. This includes converting all measurements to common units,
handling missing values, and preparing the data for analysis.

2. Implementation of Machine Learning Models: To employ machine learning techniques, specifically


the Nearest Neighbors algorithm, to analyze user inputs and identify the best matching property from the
dataset. This involves training the model on relevant features such as the number of bedrooms,
bathrooms, house size, and price.

3. Development of a User-Friendly Interface: To create an intuitive and accessible web interface using
HTML and CSS, allowing users to easily input their housing requirements and view the recommended
properties. The interface should be visually appealing, easy to navigate, and provide a seamless user
experience.

4. Integration of Backend and Frontend: To ensure smooth interaction between the backend (Python and
Flask) and the frontend (HTML and CSS), enabling efficient data processing and real-time display of
results. The integration should facilitate quick response times and accurate presentation of information.

5. Enhancement of Decision-Making: To provide users with valuable insights and recommendations that
aid in their decision-making process when searching for house properties. The project aims to leverage
data-driven techniques to offer personalized property suggestions that align with user preferences and
constraints.

6. Scalability and Adaptability: To design the system in a manner that allows for scalability and
adaptability to different datasets, regions, and user requirements. The platform should be flexible enough
to incorporate additional features and improvements based on user feedback and evolving market trends.

11
3. Backend Development

The backend development of the Boston Housing Analysis project is a crucial component that handles
data processing, model training, and integration with the frontend. This section provides an overview of
the backend architecture, key functionalities, and technologies used in the project.
Data Integration and Preprocessing
The initial step in backend development involves loading and preprocessing the dataset. The dataset,
containing various house properties, is loaded using the Pandas library. The data preprocessing phase
includes:
 Data Cleaning: Handling missing values by removing rows with null entries to ensure a clean
dataset for analysis.
 Unit Conversion: Converting all property sizes to a common unit (square feet) to maintain
consistency. This involves converting sizes from units such as acres to square feet using
appropriate conversion factors.
 Feature Engineering: Selecting relevant features such as the number of bedrooms, bathrooms,
house size, and price for model training.
Machine Learning Model
The core of the backend development is the implementation of the machine learning model. The project
uses the Nearest Neighbors algorithm, which is well-suited for finding the closest match based on the
provided criteria. The steps involved in model implementation are:
1. Feature Selection: Selecting the key features (bedrooms, bathrooms, size, price) for training the
model.
2. Model Training: Training the Nearest Neighbors model using the Scikit-Learn library. The
model is trained to find the property that best matches the user’s input criteria.
3. Model Evaluation: Evaluating the model’s performance to ensure it accurately predicts the best
matching property.
Web Framework (Flask)
The Flask framework is used to integrate the backend with the frontend, facilitating smooth interaction
and data flow. Key functionalities implemented using Flask include:
 Routing: Defining routes for different web pages, such as the home page and results page. Flask
routes handle user requests and render appropriate HTML templates.
 Form Handling: Processing user inputs from the web form, retrieving values for bedrooms,
bathrooms, house size, and price.
 Prediction Logic: Using the trained machine learning model to find the best matching property
based on user inputs. The model’s prediction is then passed to the frontend for display.

12
Integration with Frontend
The backend and frontend are seamlessly integrated to ensure efficient data processing and real-time
display of results. Flask handles the rendering of HTML templates and passing of data between the
backend and frontend. This integration involves:
 Template Rendering: Rendering HTML templates using Flask’s render_template function,
which dynamically inserts data into the HTML pages.
 Data Passing: Passing the predicted property details from the backend to the frontend for display
in a user-friendly format.
Technologies Used
 Python: The primary programming language for backend development, chosen for its versatility
and extensive libraries.
 Pandas: Used for data loading, cleaning, and preprocessing.
 NumPy: Utilized for numerical operations and data manipulation.
 Scikit-Learn: Employed for implementing the Nearest Neighbors machine learning algorithm.
 Flask: A lightweight web framework used for integrating the backend with the frontend, handling
routing, and processing user inputs.
The backend development of the Boston Housing Analysis project showcases the effective use of data
science and web development technologies to create a functional and user-friendly platform. By
leveraging Python, machine learning, and web frameworks, the project aims to deliver accurate and
personalized property recommendations to users.

13

4. Frontend Development

The frontend development of the Boston Housing Analysis project focuses on creating an intuitive and
engaging user interface that facilitates easy interaction with the platform. This section provides an
overview of the frontend architecture, design principles, and technologies used in the project.

User Interface Design

The primary goal of the frontend is to provide a seamless and user-friendly experience. The design
principles include:
 Simplicity: Ensuring that the interface is clean and simple, with clear instructions and an intuitive
layout.
 Responsiveness: Making sure the interface is responsive and functions well across different devices
and screen sizes.
 Accessibility: Designing the interface to be accessible to all users, including those with disabilities.

HTML Structure

HTML (HyperText Markup Language) is used to create the basic structure of the web pages. The key
HTML components include:
 Forms: Used to collect user inputs such as the number of bedrooms, bathrooms, house size, and
price. The form elements include labels, input fields, and a submit button.
 Tables: Used to display the results of the property search in a structured and readable format.
 Headings and Paragraphs: Utilized to organize content and provide clear instructions to the users.
 

14
5. code

Python Script (app.py)

import pandas as pd
import numpy as np
from sklearn.neighbors import NearestNeighbors
from flask import Flask, request, render_template
import os

app = Flask(__name__)

# Load the dataset


data_path = 'Data/train.csv.xlsx'
df = pd.read_excel(data_path)

# Data preprocessing
# Convert all sizes to a common unit (e.g., sqft)
def convert_size(row):
if row['size_units'] == 'sqft':
return row['size']
elif row['size_units'] == 'acre':
return row['size'] * 43560 # 1 acre = 43560 sqft
else:
return np.nan

df['size'] = df.apply(convert_size, axis=1)

# Convert all lot sizes to a common unit (e.g., sqft)


def convert_lot_size(row):
if row['lot_size_units'] == 'sqft':
return row['lot_size']
elif row['lot_size_units'] == 'acre':
return row['lot_size'] * 43560 # 1 acre = 43560 sqft
else:
return np.nan

df['lot_size'] = df.apply(convert_lot_size, axis=1)

# Drop rows with missing values


df.dropna(inplace=True)

# Features for nearest neighbors


features = ['beds', 'baths', 'size', 'price']

# Train NearestNeighbors model


15
model = NearestNeighbors(n_neighbors=1)
model.fit(df[features])

@app.route('/')
def index():
return render_template('index.html')

@app.route('/results', methods=['GET'])
def results():
# Get form data
beds = int(request.args.get('bedrooms'))
baths = int(request.args.get('bathrooms'))
size = int(request.args.get('size'))
price = int(request.args.get('price'))

# Find the best match


user_input = np.array([[beds, baths, size, price]])
_, indices = model.kneighbors(user_input)
best_property = df.iloc[indices[0][0]]

return render_template('results.html', property=best_property)

if __name__ == '__main__':
app.run(debug=True)

HTML Code (index.html)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Property Search</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="form-container">
<h1>Property Search</h1>
<form action="{{ url_for('results') }}" method="get">
<label for="bedrooms">Enter a number of bedrooms you want:</label>
<input type="number" id="bedrooms" name="bedrooms" required>

<label for="bathrooms">Enter a number of bathrooms you want:</label>


<input type="number" id="bathrooms" name="bathrooms" required>

<label for="size">Enter the size of the house in sqft:</label>


<input type="number" id="size" name="size" required>
16
<label for="price">Enter your approximate price for the property:</label>
<input type="number" id="price" name="price" required>

<button type="submit">Submit</button>
</form>
</div>
</body>
</html>

results.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Property Results</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="results-container">
<h1>Best Property According to Your Provided Details</h1>
<table>
<thead>
<tr>
<th>Bedroom</</th>
<th>Bathroom</th>
<th>Size</th>
<th>Size Unit</th>
<th>Lot Size Unit</th>
<th>Zip Code</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ property['beds'] }}</td>
<td>{{ property['baths'] }}</td>
<td>{{ property['size'] }}</td>
<td>sqft</td>
<td>sqft</td>
<td>{{ property['zip_code'] }}</td>
<td>${{ property['price'] }}</td>
</tr>
</tbody>
</table>
17
</div>
</body>
</html>

Script.css

body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.form-container {
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
}

h1 {
text-align: center;
margin-bottom: 20px;
}

label {
display: block;
margin-top: 10px;
}

input {
width: 100%;
padding: 8px;
margin-top: 5px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 4px;
}

button {
width: 100%;
padding: 10px;
background-color: #007bff;
color: white;
border: none;
18
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}

.results-container {
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 80%;
margin: 50px auto;
text-align: center;
}

table {
width: 100%;
border-collapse: collapse;
}

th, td {
padding: 10px;
border: 1px solid #ddd;
text-align: left;
}

th {
background-color: #f4f4f4;
}

19
6. Output

20
7. Conclusion

The Boston Housing Analysis project successfully demonstrates the integration of data science and web
development to create a functional and user-friendly platform for property recommendations. By leveraging
machine learning algorithms and modern web technologies, the project provides users with personalized property
suggestions based on their specific criteria.

Key achievements of the project include:


 Effective Data Preprocessing: Converting and cleaning data to ensure consistency and accuracy
in the analysis.
 Accurate Property Recommendations: Implementing a Nearest Neighbors model to find the
best matching properties based on user inputs.
 Seamless Backend-Frontend Integration: Utilizing Flask to connect the backend data
processing and model prediction with a responsive and intuitive frontend interface.
 User-Centric Design: Creating a simple, responsive, and accessible web interface that allows
users to easily input their requirements and view results.

Through this project, we have demonstrated the potential of combining data science and web
development to solve real-world problems. The Boston Housing Analysis project not only showcases
technical skills but also emphasizes the importance of user experience and accessibility in software
development.

Moving forward, the project can be enhanced by incorporating additional features such as user
authentication, saving search preferences, and integrating more advanced machine learning models for
better accuracy. Continuous improvement and user feedback will play a crucial role in the further
development and success of the platform.
The Boston Housing Analysis project is a testament to the power of interdisciplinary collaboration, where
data science and web development come together to create impactful solutions for everyday challenges.
This project has laid a strong foundation for future enhancements and applications in the real estate
domain.

21
8. References

 Pandas Documentation
 Scikit-Learn Documentation
 Flask Documentation
 HTML Documentation
 CSS Documentation

22

You might also like