Giter Club home page Giter Club logo

tf-keras-demo's Introduction

tf-keras-demo

A simple neural network example using TensorFlow Keras.

Getting started

Prerequisites

This project was compiled with Python 2.7.13 (downloadable from python.org)

Installing

This project uses

  1. TensorFlow version 1.12.0 pip install tensorflow
  2. Keras version 2.1.6-tf pip install keras

Fetching data

Data for this demonstration was retrieved from the Government of Canada's historical data portal

Specifically, the following command was used to download the 2012-2018 weather data from an Ottawa-Gatineau weather station:

for year in `seq 2012 2018`;do for month in `seq 1 12`;do wget --content-disposition "http://climate.weather.gc.ca/climate_data/bulk_data_e.html?format=csv&stationID=50719&Year=${year}&Month=${month}&Day=14&timeframe=1&submit= Download+Data" ;done;done

Data cleaning

The data comes with several lines of meta data at the top of each file like the sample below.

"Station Name","OTTAWA GATINEAU A"
"Province","QUEBEC"
"Latitude","45.52"
"Longitude","-75.56"
"Elevation","64.30"
"Climate Identifier","7032682"
"WMO Identifier",""
"TC Identifier","YND"
"All times are specified in Local Standard Time (LST). Add 1 hour to adjust for Daylight Saving Time where and when it is observed."

"Legend"
"E","Estimated"
"M","Missing"
"NA","Not Available"

unify_data.py iterates through all the files and integrates this data into the CSV format with all the other data. The script also removes lines with no weather data (many instances include only the date and time).

You should update the data_location variable at the top of the script to point to the location where you downloaded the files from the historical data portal.

Data investigation

The examine_data.py script iterates through the unified data and outputs the number of records for each feature/column. This helps us identify which fields are most often present or missing.

Models

A very simple model is created to effectively perform a linear regression.

Authors

  • Rachel Hartviksen

Motivation

This project was create for a neural networks lecture and demonsation for the Ottawa Ladies Code Club

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

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.