KNN Technique For Analysis and Prediction of Temperature and Humidity Data
KNN Technique For Analysis and Prediction of Temperature and Humidity Data
KNN Technique For Analysis and Prediction of Temperature and Humidity Data
7
International Journal of Computer Applications (0975 – 8887)
Volume 61– No.14, January 2013
8
International Journal of Computer Applications (0975 – 8887)
Volume 61– No.14, January 2013
Fig. 2(d) and (e) shows the temperature and humidity values found to be 0.143 for temperature prediction and 3.601 for
from the dataMatrix for the index obtained in neighbors matrix. humidity prediction.
The average values of ith column in tP and hP matrix gives the
predicted values for temperature and humidity for the ith day. 3. RESULTS
Fig. 2(e) shows the predicted values for temperature and Fig. 3 shows the graphical user interface of the temperature and
humidity for four days i.e. 28-2-2012 to 2-3-2012. The mean humidity prediction system using data mining.
square error was calculated for the above prediction it was
9
International Journal of Computer Applications (0975 – 8887)
Volume 61– No.14, January 2013
Fig. 4 Plotted Graph for Temperature Analysis for the year 2009
10
International Journal of Computer Applications (0975 – 8887)
Volume 61– No.14, January 2013
3.3 Clustering and 2011. The cluster formed is shown in Fig. 8. Twelve such
In this research work the datasets were divided in number of clusters for each month from January to December are already
clusters based on the type of analysis required for that created in the system based on three years dataset. In same way
‘Clustering’ button is used, Fig. 7 shows the procedure to create 38 clusters for all months from January 2009 to February 2012
cluster for the month of April. The output of clustering forms a was created and 6 cluster for temperature and humidity 2 for
data matrix of size 90 X 3 which consists of date temperature each year 2009, 2010 and 2011 was already stored in the
and humidity values of April month for the years 2009, 2010 database.
11
International Journal of Computer Applications (0975 – 8887)
Volume 61– No.14, January 2013
12
International Journal of Computer Applications (0975 – 8887)
Volume 61– No.14, January 2013
Fig. 10 Temperature and Humidity Graph with Actual and Predicted values
satisfying accuracy of prediction. In future the following things
can be implemented in this research:
Adding other climatic parameters such as dew point, pressure,
light intensity etc for prediction and increasing the duration of
prediction.
Using larger units of analysis i.e. analyzing the results of
prediction of K-Nearest Neighbor on dataset of number of other
cities or places.
Providing Signal analysis tools for automatic analysis of variation
in the pattern of temperature and humidity data and validating
resulting output patterns to researchers.
i. KNN can be combined with some other techniques such as
Fuzzy Logic which can increase the accuracy of prediction.
ii. The software could be embedded with hardware and used as
a complete unit of prediction. Additional feature helpful to
farmers can be implemented such as prediction of type of crop
that should be planted base on the predicted value of
atmospheric parameters.
Fig. 11 Predicted Values for Temperature and Humidity 6. REFERENCES
[1] Larose D. T.: Discovering Knowledge in Data: An
4. CONCLUSION Introduction to Data Mining, Wiley, Chichester 2005
KNN can predict temperature and humidity with satisfying
accuracy at times but at some other instance of time the accuracy [2] S. Kotsiantis and et. al., “Using Data Mining Techniques for
of prediction reduces due to uncertain behavior of the climatic Estimating Minimum, Maximum and Average Daily
condition. It was observed in some instances that for humidity Temperature Values”, World Academy of Science,
prediction the difference in predicted and actual values were more Engineering and Technology 2007 pp. 450-454
it can be due to the sudden change that occurs in humidity of [3] Han J., Kamber M.: Data Mining concepts and Techniques,
atmosphere which is more frequent for humidity than as compared Elsevier Science and Technology, Amsterdam 2006
to that of temperature. Prediction of temperature and humidity
was done for number of days and it was found that K-Nearest [4] Cover T, Hart P (1967) “Nearest neighbor pattern
Neighbor produced satisfying results in terms of prediction of classification”. IEEE Trans Inform Theory Volume 13(1) pp.
temperature and humidity with accuracy of 88% to 92% for 21–27
temperature prediction and of 85% to 90% for humidity [5] Badhiye S. S., et.al., ‘Temperature and Humidity Data
prediction. The results obtained were satisfying as it is assumed Analysis for Future Value Prediction using Clustering
that no forecasting system can be 100 % accurate due to Technique: An Approach’, International Journal of Emerging
uncertainty of climatic parameters. Technology and Advanced Engineering, 2(1), pp. 88-91,
2012.
5. FUTURE SCOPE
At present the system is able to predict temperature and humidity
data for four days by using K-Nearest Neighbor algorithm with
13