Skip to content

Rainfall Prediction App is an application designed to predict rainfall in the Banyuasin Regency, Indonesia. This project serves as a final project developed to complete the undergraduate program at the University of Sriwijaya. The method employed involves the Tsukamoto Fuzzy Inference System optimized using genetic algorithms.

License

Notifications You must be signed in to change notification settings

murafba/Rainfall-Prediction-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rainfall-Prediction-App

This app was developed to support the author's final research activities:

Optimization of Tsukamoto FIS In Predicting Rainfall In Banyuasin Regency Using Genetic Algorithm

Select The Language
Table of Contents

1. INTRODUCTION

The Rainfall Prediction App is a desktop-based application developed to forecast rainfall in Banyuasin Regency, South Sumatera Province, Indonesia. Developing this application is a mandatory requirement to obtain the Bachelor of Computer Science degree from the University of Sriwijaya. The prediction model in this application employs the Tsukamoto Fuzzy Inference System (FIS) optimized using the Genetic Algorithm (GA). Based on the conducted research, the lowest Mean Absolute Percentage Error (MAPE) achieved in predicting rainfall using this model is 27.8%. The monthly climate data of Banyuasin Regency from January 2018 to December 2022 will be utilized for rainfall prediction. The climate data comprises attributes such as temperature, air humidity, air pressure, wind velocity, and rainfall.

2. HARDWARE & SOFTWARE REQUIREMENTS

The hardware required to support the operation of this application is as follows:

  1. Laptop or PC with a minimum display resolution of 1280 * 720

The software required to support the operation of this application is as follows:

  1. Windows OS 10/11 64-bit
  2. NetBeans IDE version 14 and above
  3. Java Development Kit (JDK) version 20 and above

3. INSTALLING THE PROJECT

Installing the application via Git Bash CLI:

  • Open Git Bash
  • Choose the download location folder. For example: cd d://downloads
  • Type git clone https://github.com/murafba/Rainfall-Prediction-App.git
  • Check the download folder and open the project

4. RUNNING THE APP

Here are the steps to run the app:

  1. Launch NetBeans
  2. Open the downloaded project

Important

If the default JDK used is below version 20, it needs to be changed. Here are the steps: (a) Right-click on the project; (b) Select properties; (c) Choose the Libraries menu; (d) In the Java Platform dropdown menu, select JDK version 20 or above.

  1. Open the gui package and select the Main.java class
  2. Run the application

5. USING THE APP

There are 2 functional requirements of the application system:

Use Case Diagram Fig. 1 Use Case Diagram

5.1 Predicting Rainfall From A Dataset

Use case 1 is implemented on the app's homepage. This page is utilized to conduct research on rainfall prediction to find the lowest MAPE value using genetic algorithm parameters: generation size, population size, crossover rate, and mutation rate. Afterwards, click the button to initiate the program.

Caution

The values that can be input for crossover rate and mutation rate are limited to a range between 0 and 1! If they are outside of this range, the program will display an error message. Additionally, each parameter only accepts numerical input data.

Below is the display of the homepage, the activity, and the sequence diagram:

Homepage Fig. 2 Homepage

Activity Diagram 1 Fig. 3 Activity Diagram

Sequence Diagram 1 Fig. 4 Sequence Diagram

5.2 Predicting Rainfall From New Data

Use case 2 is implemented on the Manual Forecasting page. This page is used to predict rainfall values from new data. The boundaries of the fuzzy membership functions used are taken from the chromosome that had the lowest MAPE value during the research, which was 27.8%. After inputting attribute values for temperature, air humidity, air pressure, and wind speed, click the button. Here is the display of the Manual Forecasting page.

Manual Forecasting Page Fig. 5 Manual Forecasting Page

Activity Diagram 2 Fig. 6 Activity Diagram

Sequence Diagram 2 Fig. 7 Sequence Diagram

6. CLASS IMPLEMENTATION

6.1 GeneticAlgorithm.java

This class is an abstract superclass that utilized to receive input data from the Main.java class and then initiates the process of searching for chromosome that can generate membership function boundaries with the best fitness value. The stage starts from initializing the initial population to computing the fitness value.

6.2 FISTsukamoto.java

This class is a subclass of GeneticAlgorithm.java used to calculate the rainfall value using the Tsukamoto FIS method, both from the homepage and the manual forecasting page. This class also computes the Absolute Percentage Error (APE) and Mean Absolute Percentage Error (MAPE), then returns the MAPE values to the superclass. The process begins with fuzzification, rule-based implication, defuzzification, and culminates in the evaluation of the MAPE value.

6.3 Main.java

This class represents the application's GUI, comprising the Homepage and the Manual Forecasting page.

Here is the class diagram of the application:

Class Diagram Fig. 8 Class Diagram

7. ABOUT THE RESEARCH

If you're interested in my research, you can read mine at the following link.

8. ABOUT THE AUTHOR

Hi! My name is Muhammad Rafi Akbar. You can call me Rafi. I'm a bachelor of computer science from Sriwijaya University majoring in Informatics. I have a keen interest in fuzzy logic and cryptography fields. You can reach out to me through the following accounts.

9. SUPPORT ME

If you found my project useful, you can show your support by attributing to this project and giving it a star on this repository. Alternatively, you can also provide material support through the following links:

10. HOW TO CONTRIBUTE

Pull requests are not available. I will provide a dedicated repository related to the research where you can make pull requests on that page. If you have any questions or recommendations, please feel free to do so in the Issues section.

11. LICENSE

Copyright © 2023 Muhammad Rafi Akbar
This project is under the MIT License.

12. ACKNOWLEDGEMENT

As the developer, I'm aware that the developed application still has some shortcomings. Therefore, constructive criticism and suggestions from colleagues are highly appreciated.

About

Rainfall Prediction App is an application designed to predict rainfall in the Banyuasin Regency, Indonesia. This project serves as a final project developed to complete the undergraduate program at the University of Sriwijaya. The method employed involves the Tsukamoto Fuzzy Inference System optimized using genetic algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages