0% found this document useful (0 votes)
4 views

Weather Pattern Analysis and Prediction Chaman

Uploaded by

rakshanmanivanna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Weather Pattern Analysis and Prediction Chaman

Uploaded by

rakshanmanivanna
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Weather Patterns

Analysis and
Prediction

Student’s Name: R.CHAMAN


Submission Date: 21.12.2024
objective

• To Conduct an exploratory data analysis


(EDA),
• To Implement K-Nearest Neighbors
(KNN) classification for prediction, and
• To Apply K-Means clustering to group
weather patterns.
The dataset contains weather records for various
days with the following columns:

• Date: Date of the record.


• Weather_Condition: The condition of the weather on that day (e.g.,
Smoke, Light Rain, Mist, Haze).
• Dew_Point (°C): The dew point temperature.
• Humidity (%): The percentage of humidity in the air.
• Pressure (hPa): The atmospheric pressure.
• Temperature (°C): The temperature recorded.
• Visibility (km): The visibility in kilometers.
• Wind_Direction (Compass): The direction of the wind (e.g., NNW,
NE)
• Rain_Presence: Binary value indicating if rain is present (1 = Yes, 0
= No)..

• Tools and Techniques : The project is achievable using tools like


Google Sheets or Excel
Exploratory Data Analysis (EDA)

Key Findings: Highest temperature the average humidity


recorded recorded across all days
Increase in humidity and pressure across
the graph
'Humidity (%)', 'Pressure (hPa)' by 'Date'
1200

1000

800

600

400

200

Date

Humidity (%) Pressure (hPa)


K-NN Classification:

Steps in K-NN Classification

Choose KKK:
• Select the number of nearest neighbors to consider.

Compute Distances:
• For a query point, calculate the distance between it and all training points.

Select Neighbors:
• Identify the KKK points closest to the query point.

Vote on Class:
• Determine the majority class among the KKK neighbors.

Predict Class:
• Assign the class with the highest vote to the query point.
K-NN
Classification:
K-Means Clustering:

1. Initialize Centroids
•Randomly select k data points from the dataset as the initial centroids (the center of each cluster).
•These centroids can also be selected using other methods like the K-Means++ to improve convergence speed and quality.

2. Assign Points to Nearest Centroid


•For each data point in the dataset, calculate the distance (typically Euclidean distance) to each centroid.
•Assign each data point to the cluster whose centroid is the closest.

3. Recalculate Centroids
•After assigning all points to clusters, recalculate the centroid of each cluster by taking the mean of all data points in that
cluster.
•This new centroid represents the center of the cluster.

4. Repeat Steps 2 and 3


•Repeat steps 2 and 3 until convergence, i.e., the centroids no longer change or the maximum number of iterations is
reached.
•In practice, the algorithm stops when the centroids stabilize or the assigned clusters don’t change significantly between
iterations.

5. Final Clusters
•Once the centroids stabilize, the algorithm has finished, and the final clusters are formed. Each data point belongs to the
cluster whose centroid it is closest to.
K-Means
Clustering:
on haze
days
Insights and Learnings

• Key Takeaways:
• I discovered many types of graphs and
pie charts based on the given data
about weather from the data sheet
• It helped me realise and predict many
types of weather patterns
- Unique insights into the dataset

• Temperature Trends: Analyze how the average


temperature varies across different months or seasons
.This can help identify long-term trends in temperature
changes, seasonality, and the impact of global
warming.
• Precipitation Patterns: Understand how rainfall or
snowfall changes with seasons or monthly trends
• Temperature and Humidity : how it varied for every
single day
• Wind Speed and Temperature: relationship between
wind speed and temperature. In many regions, wind
have a cooling effect, which can be important for
understanding comfort levels.
• Pressure and Weather Events: Atmospheric pressure
often precedes weather changes. For example, a drop
in pressure can signal stormy weather, while high
pressure can indicate clear skies.
Contribution of tools/methods to
solving the problem

I mostly used tools like : excel , orange tool

Some questions were hard to answer so I had to get


some help from youtube video or the previous lectures

Also some AI programs were used for this assignment


Challenges and Recommendations

• Challenges:
• I believe This program was mainly
made for pc or laptop users as it was
surely hard to do from mobile or tab
since we won’t be able to use many
application which the pc or laptop
users could make use of
• Some of the answers for the questions
were hard to get since it required more
steps
• I would recommend this project to be made
simple and easy also for mobile users and
Recommendations: not only for pc or laptop users
- Suggestions for • The explanations were not so clear for new
improvement in learners
future projects.
• We require more examples to solve the
project and more questions
Conclusion

• Recap:
• this project was to Conduct an exploratory data analysis
(EDA),
• Implement K-Nearest Neighbors (KNN) classification for
prediction, and
• Apply K-Means clustering to group weather patterns.
• Project’s purpose was to make us work out our skills we learned
from the course
Broader Implications:
- Value of data science and AI in
solving similar problems
• The value of data science and AI in solving problems extends well beyond a
single use case. These technologies drive efficiency, innovation, and
personalization, while also providing the tools to make more informed, data-
driven decisions across various sectors. By leveraging data and AI, industries
can optimize operations, improve customer experiences, and create
transformative solutions for both businesses and society. As these
technologies continue to evolve, their applications will grow, enabling
deeper insights and more impactful solutions across the globe.
References
• Resources:
• - Tools and software.
1. Excel
2. google
3. orange
4. python

• - Websites, articles, or books referenced.


1. The official IIT madras course
2. YouTube references
Thanking you

• Student’s Name:
R.CHAMAN
Submission Date:
21.12.2024

You might also like