GithubHelp home page GithubHelp logo

weather-time-series-analysis's Introduction

Weather-Time-Series-Analysis

New York City Taxi Trip - Hourly Weather Data Time Series Analysis

For Dicoding Submission Project

Library Used

  • Tensorflow
  • Keras
  • Scikit learn
  • matplotlib
  • Numpy
  • Pandas

Data set composition

  • Variable used: tempm (hourly mean temperature)
  • Data Shape : (10476, 2)

Step by Step Model Building

Data Cleaning

  • Check Null
  • Drop NUll (5 rows)
  • Check Dtypes\

Examine the data

Set Minimum MAE

  • (Variable maximum value - variable minimum value) * (10/100)

Perform Train-Test Split

  • 0.2 validation set
  • Shuffle False (time series data is sensitive to shuffled data)
  • set Random state

Build LSTM model

  • 2 hidden layer (perceptron 512 units and 128 units)
  • output layer 'Softmax'
  • model = keras.Sequential([
  • layers.Conv1D(filters=32, kernel_size=5,
  •                  strides=1, padding="causal",
    
  •                  activation="relu",
    
  •                  input_shape=[None, 1]),
    
  • layers.LSTM(64, return_sequences=True),
  • layers.LSTM(64, return_sequences=True),
  • layers.Dense(30, activation="relu"),
  • layers.Dense(10, activation="relu"),
  • layers.Dense(1),
  • layers.Lambda(lambda x: x * 400)
  • ])

Adding Loss Function and Optimizer with learning rate

  • loss : Huber
  • optimizer Sgd with learning rate
  • metrics MAE

Adding custom Early stop function using tensorflow callback

  • Set to stop training if val accuracy is smaller than target MAE

Training the model

  • epoch : 500
  • callbacks

Results

  • Best Validation Loss: 4.91

  • Best Validation MAE: 5.37

  • Loss

  • Accuracy

weather-time-series-analysis's People

Contributors

sadhityadimas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.