KEMBAR78
Darshan Int 3 | PDF | Statistical Classification | Logistic Regression
0% found this document useful (0 votes)
19 views23 pages

Darshan Int 3

This project focuses on developing a web-based system for predicting human stress levels using machine learning, physiological data analysis, and a user-friendly interface. It aims to collect data such as heart rate variability and sleep quality, process it with algorithms like Logistic Regression, and provide personalized stress management recommendations. The system will utilize Django for backend development and Bootstrap for frontend design, ultimately enhancing individual mental well-being through proactive stress management.

Uploaded by

likithgn17
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)
19 views23 pages

Darshan Int 3

This project focuses on developing a web-based system for predicting human stress levels using machine learning, physiological data analysis, and a user-friendly interface. It aims to collect data such as heart rate variability and sleep quality, process it with algorithms like Logistic Regression, and provide personalized stress management recommendations. The system will utilize Django for backend development and Bootstrap for frontend design, ultimately enhancing individual mental well-being through proactive stress management.

Uploaded by

likithgn17
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/ 23

Academic Score Prediction 2024-25

CHAPTER 1

INTRODUCTION

1.1 Introduction

This project aims to develop a data-driven system for predicting human stress levels. By
leveraging a combination of machine learning techniques, physiological data analysis,
and user-friendly interfaces, we aim to create a tool that can assist individuals in
proactively managing their stress and promoting overall mental well-being.The system
will collect relevant data points, such as heart rate variability, quality of sleep, physical
activity levels, and BMI category. This data will be processed and analyzed using
machine learning algorithms to identify patterns and predict future stress levels.The
project will utilize a user-friendly web interface, built with technologies like Django and
Bootstrap, to facilitate data collection and present the prediction results in an easily
understandable format. This interface will also provide users with personalized
recommendations for stress management techniques. This project has the potential to
significantly impact individual and public health by providing individuals with valuable
insights into their stress levels and empowering them to take proactive steps towards
improving their mental and emotional well-being.

Bootstrap is a widely-used front-end framework that provides a collection of pre-designed


HTML, CSS, and JavaScript components for building responsive and visually appealing
websites and web applications. It offers a comprehensive set of ready-to-use elements
such as grids, form elements, navigation bars, and more, significantly accelerating the
development process.
One of Bootstrap's key strengths lies in its emphasis on creating responsive designs that
adapt seamlessly to various screen sizes, from small mobile devices to large desktops.
This ensures a consistent and optimal user experience across different platforms.
Furthermore, Bootstrap adheres to a mobile-first approach, prioritizing the mobile user
experience and then scaling up to larger screen sizes, a crucial aspect in today's mobile-
centric world. Bootstrap is designed with ease of use in mind. Its clear documentation,
extensive community support, and intuitive syntax make it accessible to developers of all
skill levels, from beginners to experienced professionals. While providing a strong

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 1


Academic Score Prediction 2024-25
foundation, Bootstrap is highly customizable, allowing developers to modify styles, add
custom CSS, and integrate their own JavaScript code to create unique and personalized
designs.In essence, Bootstrap empowers developers to build robust, visually appealing,
and responsive websites and web applications efficiently, streamlining the development
process and enhancing the overall user experience.

In the context of a human stress prediction project, Django plays a pivotal role in
orchestrating the entire application. It acts as the backbone, providing the structure and
functionality for the web interface, data handling, and user interactions.
Django's Model-View-Template (MVT) architectural pattern guides the development
process. Models represent the data structure, defining how user data (e.g., physiological
measurements, self-reported stress levels) and stress prediction results are stored in the
database. Views handle the logic, processing user requests, interacting with the database,
and preparing data for presentation. Templates, written in HTML with Django's
templating language, define the visual presentation of the web pages, including forms for
data input, display of predictions.

Django's built-in features, such as the Object-Relational Mapper (ORM) for interacting
with the database, URL routing for mapping URLs to specific views, and a robust
authentication system, significantly streamline the development process. The ORM
allows developers to interact with the database using Python code instead of writing
complex SQL queries, making data management more efficient. URL routing ensures that
user requests are correctly directed to the appropriate views, while the authentication
system provides secure user login and access control.
By leveraging Django's capabilities, the stress prediction project can be developed
efficiently, with a focus on maintainability, scalability. Django provides a solid
foundation for building a robust and user-friendly web application that empowers
individuals to proactively manage their stress levels and improve their overall well-being.

Here are the few machine learning algorithms that can be used
Several machine learning algorithms can be effectively employed for human stress
prediction. Support Vector Machines (SVMs) excel at finding optimal boundaries to
separate data points into different stress levels, while Random Forest, an ensemble
learning method, leverages multiple decision trees to improve accuracy and handle
complex relationships between features.Long Short-Term Memory (LSTM) networks are

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 2


Academic Score Prediction 2024-25
particularly well-suited for analyzing time-series data like heart rate variability, capturing
temporal dependencies in physiological signals.

Logistic Regression, while primarily used for binary classification, can be adapted for
multi-class stress level prediction. Logistic Regression is a suitable choice for this project
due to its ability to predict the probability of an instance belonging to different stress level
categories (e.g., low, medium, high). This probabilistic output provides valuable insights
into the likelihood of an individual experiencing various stress levels, offering a more
nuanced understanding than simply classifying individuals as "stressed" or "not stressed."
Moreover, Logistic Regression models are known for their interpretability, allowing
researchers to understand the influence of different factors on stress levels.

Linear Regression, while primarily used for predicting continuous values, can be adapted
for stress prediction. By predicting a continuous stress score and then discretizing it into
different stress levels, Linear Regression can be employed. However, it's crucial to
consider the limitations of Linear Regression, such as the assumption of linearity in the
relationship between predictors and the outcome, which may not always hold true in the
context of stress prediction.

Naive Bayes is a probabilistic algorithm that can be effective when dealing with
categorical features. By representing stress-related features as categorical variables (e.g.,
sleep quality: good, fair, poor), Naive Bayes can predict the probability of belonging to a
particular stress level category. However, it's important to note that Naive Bayes assumes
independence between features, which might not always be accurate in real-world
scenarios where various factors influencing stress can be interrelated.

Gradient Boosting Machines (GBM), such as XGBoost and LightGBM, build an


ensemble of weak learners to achieve high predictive accuracy. The choice of the most
suitable algorithm depends on the specific characteristics of the data and the desired
prediction outcomes.

The selection process involves experimentation and evaluation using appropriate metrics
such as accuracy, precision, recall, F1-score, and AUC-ROC. By carefully selecting and
tuning the appropriate algorithm, the stress prediction system can achieve high accuracy
and provide valuable insights into individual stress levels, enabling proactive stress
management strategies.

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 3


Academic Score Prediction 2024-25
These are just a few of the machine learning algorithms that can be considered for this
human stress prediction project. The optimal choice will depend on the specific
characteristics of the data, the desired level of interpretability, and the computational
resources available.

For this human stress prediction project, I've selected Logistic Regression as the primary
machine learning algorithm.
Logistic Regression is particularly well-suited for this task due to its ability to predict the
probability of an instance belonging to different stress level categories (e.g., low,
medium, high). This probabilistic output provides valuable insights into the likelihood of
an individual experiencing various stress levels, offering a more nuanced understanding
than simply classifying individuals as "stressed" or "not stressed."

Furthermore, Logistic Regression models are known for their interpretability. The
coefficients associated with each feature (e.g., heart rate variability, sleep duration)
indicate the direction and strength of their influence on the predicted stress level. This
interpretability is crucial for understanding the key factors contributing to an individual's
stress and for developing targeted interventions.
Beyond its interpretability, Logistic Regression offers several practical advantages. It is
computationally efficient, making it suitable for handling large datasets and enabling
faster model training and prediction. This efficiency is particularly important for potential
real-time or near real-time stress monitoring applications. Additionally, Logistic
Regression is generally robust to outliers and can handle multicollinearity among features
to some extent.

While other algorithms like Support Vector Machines or Random Forests may offer
higher accuracy in certain cases, the interpretability, computational efficiency, and ability
to provide probabilistic outputs make Logistic Regression a strong and suitable choice for
this human stress prediction project.

1.2 Objectives

The objective of this project was to develop a web-based platform for Academic Score
prediction by integrating user-provided data with machine learning algorithms. This
system aimed to predict stress levels accurately and provide actionable insights for better
stress management. The core goals were:

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 4


Academic Score Prediction 2024-25
1. Data Collection and Analysis: To create an interactive interface where users
could input stress-related information, such as their sleep, mood, and workload,
for processing by the system.
2. Machine Learning Integration: To incorporate machine learning models like
Logistic Regression, Random Forest, and Neural Networks for predicting stress
levels based on the collected data. The goal was to ensure high accuracy in
predictions by training and integrating these models into the backend.
3. Backend Development with Django: To use Django for developing the backend
system that manages user data securely, processes stress-related inputs, and serves
real-time stress predictions. The backend also had to handle user authentication
and provide an effective infrastructure for the machine learning models.
4. Frontend Development with Bootstrap: To design a responsive, user-friendly
interface using Bootstrap, where users could view their stress predictions, track
trends over time, and receive personalized recommendations for managing stress.

1.3 Scope

The scope of this project involves the development of a web-based Academic Score
prediction system that combines machine learning with web development
technologies to predict stress levels and offer personalized recommendations. The system
will collect user- provided data through interactive forms, which include factors such as
sleep, mood, workload, and environmental conditions. This data will be processed by
machine learning models, including Logistic Regression, Random Forest, and Neural
Networks, to predict stress levels in real-time. These models will be integrated into a
Django backend, which will handle user authentication, securely store data, and
communicate with the machine learning algorithms.

On the frontend, the platform will use Bootstrap to provide a responsive and intuitive
user interface that presents stress predictions, trends over time, and personalized
recommendations through interactive charts and graphs. The system will offer real-time
insights, alerting users when stress levels are high and suggesting actionable steps, such
as relaxation exercises or lifestyle adjustments. Additionally, an admin panel will be
developed to allow system administrators to monitor user data, evaluate the performance
of machine learning models, and manage system settings. The application will be useful
in

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 5


Academic Score Prediction 2024-25
various contexts, including healthcare, corporate wellness, and educational institutions,
by allowing users to track and manage their stress levels effectively.

This project aims to integrate machine learning and web technologies to create a tool that
helps individuals monitor and manage their stress, ultimately improving overall well-
being.

1.4 Application

Bootstrap
• Responsive Web Design: Bootstrap simplifies creating mobile-friendly and
responsive interfaces for web applications.
• UI/UX Development: Provides pre-designed components like buttons, forms, and
navigation bars to enhance the user experience.
• Custom Dashboards: Enables the creation of data-driven dashboards for
visualizing information such as stress trends or user metrics.
• Cross-Browser Compatibility: Ensures consistent design across different
browsers with minimal effort.

Django
• Web Application Development: Django is ideal for building scalable, secure,
and efficient web applications for managing data and workflows.
• Backend for Stress Prediction Models: Django can handle server-side logic for
stress prediction systems, integrating with machine learning models to process
user data.
• APIs for Data Exchange: Using Django REST Framework, APIs can be created
to allow interaction between wearable devices, prediction algorithms, and user
interfaces.
• Data Management and Security: Django's ORM and authentication features
ensure safe storage and management of sensitive user data, such as stress-related
metrics.

Academic Score Prediction


• Students: Students can understand how their current efforts might influence their
future.

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 6


Academic Score Prediction 2024-25
• Education: Teachers can identify students who might need additional help and

provide tailored support.


• Analysts: Analyze the factors influencing academic performance to design better
educational strategies.
• Education Institution: By tracking predictions and taking action, institutions can
enhance overall academic performance and graduation rates.
• Parents: Provides an understanding of their child’s performance and potential.
• Future Career Planning: Predicting academic success can provide insights into
potential career paths or readiness for higher education and professional
opportunities.

1.5 Motivation

Motivation is the driving force that inspires individuals to take action and achieve their
goals. It plays a crucial role in shaping our behaviors, pushing us to overcome challenges
and strive for success. Whether it stems from internal desires like personal growth or
external factors such as rewards and recognition, motivation fuels our determination to
persevere, even in the face of adversity. It helps individuals stay focused, maintain a positive
outlook, and work diligently toward their aspirations. Without motivation, even the most
capable individuals may struggle to unlock their full potential, as it is this inner spark that
propels them toward greatness.

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 7


Academic Score Prediction 2024-25
CHAPTER 2

ABOUT THE COMPANY

TECHCITI SOFTWARE PRIVATE LIMITED is an active private, non- government


company established in 2013 and incorporated in 2024, with over 12 years of experience
in IT solutions. Located at BNR Complex, RBI Layout, JP Nagar 7th Phase, Bengaluru,
Karnataka, the company specializes in offering tailored IT services to businesses of all
sizes. With extensive technical expertise and IT infrastructure knowledge, TECHCITI
provides free consultations to help businesses identify their requirements and offers end-
to-end support, including product selection, configuration, and installation. Dedicated to
implementing the right solutions, the company ensures businesses receive advice and
support to meet their unique needs.

2.1 Services:
➢ Techciti Software Consulting is a website design and development company
based on India.
➢ Our team of designers, programmers collectively bring 10+ years of
experience to help provide you with a great looking site.
➢ TechCiti Technologies is the leading IT Managed Services Provider (MSP)
serving India’s successful SMBs. Our clients understand that a true IT partner
goes beyond the break/fix model and provides long-term solutions to business
challenges and goals.
➢ TechCiti ensures investment in information technology provides the
maximum ROI to its stakeholders through IT road mapping, planning and
strategy. With one of the highest client
satisfaction rates in the industry and the data, referrals and accolades to prove
it, TechCiti Technologies builds lasting and trusted relationships.
➢ IT Infrastructure Management - developing expertise in multiple IT solutions
like: Information Security, IT Availability [Data Storage, Back-up, Archiving
& Replication], Virtualizations(Server/Desktop), Networking and other
Solutions.
➢ Product Sales & Channel Distribution – providing Presales, Post Sales Support
& Channel Distribution related business activities by providing cost effective

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 8


Academic Score Prediction 2024-25
solutions to our End users customers and Channel partners.
➢ Technical Support & Services – provides extended support to the businesses
for smooth functioning of their IT infrastructure through customized
engineering outsourcing services.
➢ The services include Market Research & Analysis, which involves gathering
consumer insights, conducting competitive analysis, and testing products to
refine strategies. Brand Development & Strategy focuses on brand
positioning, identity creation, and rebranding to establish or refresh a
company’s market presence. Email Marketing & Automation designs
targeted email campaigns and automates workflows to engage leads and
customers. Sales Enablement includes lead generation, nurturing, and sales
team training to convert prospects effectively. Public Relations (PR) manages
media relations, handles crisis communication, and organizes events to
enhance brand reputation. Web Design & Development involves creating
user-friendly websites, e-commerce solutions, and high-conversion landing
pages. Finally, Customer Relationship Management (CRM) focuses on
implementing CRM systems, optimizing customer retention strategies, and
building loyalty through personalized engagement.

2.2 Mission Statement:


Our mission is to achieve the leading position as a distinguished & absolute end-
to-end information technology infrastructure & service provider. We want to develop
with profitable growth through superior Customer service, Innovation, Quality and
Commitment.

2.3 Vision Statement:


Our vision is to enable people and organizations realize their potential reinventing
their engagement in defining the future using - technology.

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 9


Academic Score Prediction 2024-25
CHAPTER 3

TASKS PERFORMED

3.1 Frontend (HTML, CSS, JS):

Figure 3.1.1: Login Page

Figure 3.1.2: Home Page

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 10


Academic Score Prediction 2024-25
3.2 BASIC PYTHON
I've learnt basic of Python, including variables, data types (integers, floats, strings,
booleans), conditional statements (if-else, for, while) and operators. I've worked with data
structures like lists and tuples to store and manipulate collections of data. Dictionaries and
sets I've gained experience in file handling operations, reading from and writing to files.
Additionally learnt a bit about object-oriented programming (OOP) concepts, including
classes, objects, and inheritance. This has enabled me to create modular and reusable
code.

3.3 Django
1. Created a simple Django project with basic homepage,login,register.

Figure 3.3.1: Django installation

➢ URL Patterns (urls.py):


• urlpatterns List: This list contains definitions for each URL path in the
application.
• admin/: This path directs all URLs starting with "admin/" to Django's
built-in admin interface (admin.site.urls).
• user/: This path uses include to incorporate URL patterns from another app
named "User" (likely defined in a separate urls.py file within the "User"
app).
➢ Template Directory (settings.py):
• DIRS: This dictionary setting specifies the location of your Django
templates. In this case, templates reside in a folder named
"Amazon/templates" within the base directory (BASE_DIR) of your
project.

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 11


Academic Score Prediction 2024-25
➢ Views (views.py):
• Import Statements: This section imports necessary modules like
HttpResponse for handling HTTP responses and render for rendering
templates.
• home View: This view function handles the URL path for the homepage. It
returns an HttpResponse object with an HTML string displaying
"<h1><center>E-Commerce Application</h2>".
• login and register Views: These views likely display login and registration
forms, respectively. They use the render function to render HTML
templates named "login.html" and "register.html". These templates are
likely located in the directory specified by DIRS in settings.py.
➢ Project URL Patterns (urls.py):
• Imports: This section imports path from django.urls and the views module
from the current directory.
• urlpatterns List: This list defines named URL patterns for specific views:
• path('home',views.home,name='homepage'): This path maps the URL
"/home" to the home view function and assigns it the name
"homepage."
• path('login',views.login,name='signin'): This path maps the URL
"/login" to the login view function and assigns it the name "signin."
• path('register',views.register,name='signup'): This path maps the URL
"/register" to the register view function and assigns it the name
"signup."

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 12


Academic Score Prediction 2024-25
3.4 M L Algorithms (with Data Preprocessing):
➢ The datapreprocessing is done by importing multiple libraries like pandas, numpy,
matplotlib.
➢ Pandas is a powerful library for data manipulation and analysis. It allows creating
and exploring datasets easily, such as loading data from a CSV file (df =
pd.read_csv('file.csv')) or filtering rows (filtered_df = df[df['Age'] > 25]). You can
also calculate statistics like the mean of a column (df['Salary'].mean()).
➢ NumPy is used for efficient numerical computations and array manipulations. It
allows creating arrays (arr = np.array([1, 2, 3])), performing element-wise
operations (arr * 2), and calculating statistics like mean (np.mean(arr)) or standard
deviation (np.std(arr)).
➢ Using isnull(), isnull().sum() to check missing values and using
df[""].fillna(temp,inplace=True) to replace the the null values or using
df.dropna(inplace=True) , df=df.drop("",axis=1or 0) to remove the null values
➢ Matplotlib is used for data visualization, enabling the creation of plots and charts.
You can create line plots (plt.plot(x, y)), scatter plots (plt.scatter(x, y,
color='red')), and bar charts (plt.bar(categories, values)), and display them using
plt.show().

1. Linear Regression: Linear regression is a supervised learning algorithm used for


predicting a continuous target variable based on one or more features. It assumes a linear
relationship between the input features and the output.

Figure 3.4.1: Code Snippet of Linear Regression

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 13


Academic Score Prediction 2024-25
• It is used for Predicting house prices based on features like size and location,
Forecasting sales or stock prices, Estimating demand based on historical data.

2. Logistic Regression: Logistic regression is a classification algorithm used when the


target variable is categorical, typically for binary classification (0 or 1). It calculates the
probability that a given input belongs to a certain class.

Figure 3.4.2: Code Snippet of Logistic Regression

• It is used for Spam email classification, Disease diagnosis (e.g., predicting if a


patient has a particular disease), Credit scoring or fraud detection.

3. Naive Bayes: Naive Bayes is a probabilistic classifier based on Bayes' theorem. It


assumes that the features are conditionally independent given the class. It is simple and
effective for classification problems, especially with large datasets.

Figure 3.4.3: Code Snippet of Naive Bayes

• It is used for Text classification (e.g., classifying emails as spam or not),


Sentiment analysis, Real-time prediction tasks (e.g., weather forecasting,
recommendation systems).

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 14


Academic Score Prediction 2024-25
3.5 Project

Figure 3.5.1: Data Preprocessing

Figure 3.5.2: Graph

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 15


Academic Score Prediction 2024-25

Figure 3.5.3: Prediction Page

Figure 3.5.3: Predicted Page

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 16


Academic Score Prediction 2024-25
CHAPTER 4

REFLECTION NOTES

My internship experience has been a transformative journey, offering valuable insights


into professional work environments and the application of theoretical knowledge in
practical scenarios. I gained experience in [Different frameworks, coding, etc.], which
enhanced my technical skills and problem-solving abilities. Working closely with a team
helped me develop communication and collaboration skills while understanding the
importance of adaptability in dynamic situations.

This internship also allowed me to explore new tools and technologies, such as
[HTML,CSS, Django, Bootstrap, Few ML algorithms], and taught me the significance of
meeting deadlines and managing responsibilities efficiently. One of the most rewarding
aspects was receiving constructive feedback, which guided me in refining my work and
boosting my confidence.

Overall, the internship provided a clear perspective on career goals, areas for
improvement. It was an enriching experience that strengthened my professional
foundation and prepared me for future challenges.

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 17


Academic Score Prediction 2024-25
CHAPTER 5

REFERENCES
[1] Django. (n.d.). [Online]. Available: https://www.djangoproject.com/

[2] W3Schools. (n.d.). Django, Python [Online]. Available:


https://www.w3schools.com/django/

[3] Bootstrap. (n.d.). [Online]. Available: https://getbootstrap.com/

[4] Django.(n.d.). Model Field Reference [Online]. Available:


https://docs.djangoproject.com/en/5.1/ref/models/fields/

[5] Kaggle. (n.d.). [Online]. Available: https://www.kaggle.com/

[6] NumPy. (n.d.). numpy.zeros [Online]. Available:


https://numpy.org/doc/stable/reference/generated/numpy.zeros.html

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 18


Academic Score Prediction 2024-25
CHAPTER 6

APPENDIX

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 19


Academic Score Prediction 2024-25

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 20


Academic Score Prediction 2024-25
DAIRY: SEPTEMBER-OCTOBER

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 21


Human Stress Prediction 2024-25
DAIRY: OCTOBER- NOVEMBER

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 22


Human Stress Prediction 2024-25
DAIRY: NOVEMBER- DECEMBER

Department of Artificial Intelligence and Data Science, NCE, Hassan Page 23

You might also like