/Neural-Network-Trigonometric-Function

A brief example of a neural network approximating a function of a known relationship. In this case the sine function.

Primary LanguagePython

Neural-Network-Trigonometric-Function

A brief example of a neural network approximating a function of a known relationship. In this case the sine function.

This repository contains four files. Firstly a random dataset generator, this is just for the purposes of showing where the training and testing datasets came from. If you wish to try another function, such as a cosine function, simply change the line

y = math.sin(x)

to whatever you want in it's place.

Dependecies

To use this program you will need the follwing python packages:

  • Keras
  • Numpy
  • Matplotlib

Usage

To run this file simply open your command line and navigate to your directory and run

python Model.py

The purpose of this repository is to illustrate a neural networks ability to approximate functions, feel Free to edit this code and have a play about!

NOTE

If you are wondering about the back end this example was built with tensorflow but will Run with Theano as well!