Rain Prediction: ANN
Rain Prediction: ANN
Photo by LISTENXU on Dribbble

TABLE OF CONTENTS

1. IMPORTING DATA

2. LOADING DATA

3. DATA VISUALIZATION AND TECHNIQUES

4. DATA PREPROCESSING

5. MODEL BUILDING

6. CONCLUSION

7. End



IMPORTING LIBRARIES

LOADING DATA

  1. ABOUT THE DATA

Context

Predict next-day rain by training classification models on the target variable Rain Tomorrow.

Content

This dataset contains about 10 years of daily weather observations from many locations across Australia.

Rain Tomorrow is the target variable to predict. It means — did it rain the next day, Yes or No? This column is Yes if the rain for that day was 1mm or more.

LINK- https://www.kaggle.com/jsphyg/weather-dataset-rattle-package

DATA VISUALIZATION AND CLEANING

Points to notice:

  • There are missing values in the dataset
  • Dataset includes numeric and categorical values

Steps involves in this section:

  • Count plot of target column
  • Correlation amongst numeric attributes
  • Parse Dates into datetime
  • Encoding days and months as continuous cyclic features

Rain Prediction: ANN - Data Visualization and Cleaning

 

correlation among numeric attributes

 


 

cyclic encoding of month

 

cyclic encodic of day

 


 

DATA PREPROCESSING

Steps involved in Data Preprocessing:

  • Label encoding columns with categorical data
  • Perform the scaling of the features
  • Detecting outliers
  • Dropping the outliers based on data analysis

 

Data Preprocessing

MODEL BUILDING

Following steps are involved in the model building

  • Assigning X and y the status of attributes and tags
  • Splitting test and training sets
  • Initializing the neural network
  • Defining by adding layers
  • Compiling the neural network
  • Train the neural network


 


 

Rain Prediction: ANN - Model Building

Plotting training and validation loss over epochs

training and Validation loss

 

training and validation accuracy

 

CONCLUSIONS

Concluding the model with:

  • Testing on the test set
  • Evaluating the confusion matrix
  • Evaluating the classification report

heatmap

DEEP CC

Model Summary

 

Notebook Link: Here

Credit: Hrithikgupta

 

You may also be interested in 

Become a Contributor: Write for AITS Publication Today! We’ll be happy to publish your latest article on data science, artificial intelligence, machine learning, deep learning, and other technology topics