Skip to content

Hrishvi/ai3-weather-neural-network-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Rain Predictor Neural Network

A simple neural network written entirely from scratch in Python that predicts the chance of rain using only:

  • Humidity
  • Cloud cover

The model trains itself using backpropagation, saves the best weights, and allows you to test predictions later.

It also includes premade datasets for:

  • Seattle (April–May)
  • Bangalore (April–May)

Features

  • 2-input neural network
  • 4 hidden neurons + 1 output neuron
  • Sigmoid activation function
  • Xavier weight initialisation
  • Automatic learning rate decay
  • Automatic restart if training gets stuck
  • Saves the best model as a .pkl file
  • Separate model loader and tester
  • Premade Seattle and Bangalore weather datasets

How It Works

Inputs:

  • Humidity (0.00–1.00)
  • Cloud cover (0.00–1.00)

Output:

  • Rain probability from 0.00–1.00

Example:

Humidity Cloud Cover Predicted Rain Chance
0.45 0.12 Very unlikely
0.65 0.80 Likely
0.74 0.78 Very likely

Neural Network Structure

2 Inputs
   ↓
4 Hidden Neurons
   ↓
1 Output Neuron

About

Neural Network built from scratch using NumPy for Rainfall Prediction. Educational deep-dive into backpropagation and gradient descent.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages