Giter Site home page Giter Site logo

virtuallyaverage / sin-approximation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 313.47 MB

find the minimum size network to approximate a sin, cos, or tan value.

License: GNU General Public License v3.0

Python 42.08% Lua 0.01% CSS 0.01% Tcl 2.67% C++ 50.83% C 2.54% Cuda 1.33% CMake 0.49% JavaScript 0.07% HTML 0.01%

sin-approximation's Introduction

sin-approximation

A small weekend project for estimating the sin of a value between 0-2pi radians. Mainly for learning the basics of publishing to github, managing versions, and learn the basics of maching learning. This is a quick and dirty project, so there are clear optimizations, bugs, and improvements to be made. But it has succeded in the goals of furthering my knowlege of ML, Github, PyTorch, Database creation, and python in general.

Setup on windows

  • Install torch pip install torch then restart powershell (open a new window)
  • Clone repository cd install/location git clone https://github.com/virtuallyaverage/sin-approximation.git
  • Navigate to repository and run file cd install/location python get_a_sin.py

Models

You can use a different model from the models folder by putting -m "model name here" in front of the run command. An example using a more accurate, but less predictable model: python get_a_sin.py -m "model_(9.790426247491268e-07).mdl"

  • model_(2.7785529255197616e-06).mdl (default) with a mean deviation of 0.00249rad and an mean error of 0.3074% it is not the lowest deviation, but it is the lowest error percentage. This discrepency suggests that it is more consistant across the evaluated values, which I decided would be best as the default. Even if it is off by a greater amount some times

  • model_(9.790426247491268e-07).mdl (experimental) This is a model that has been trained over 10 hours, while previous model was trained in 30 minutes. With a mean deviation of .00069rad and an mean error of 1.142% it has the lowest deviation, but loses out in the mean error. This discrepency suggests that it is less consistant across the evaluated values but more accurate overall, making it a decent model, but possibly with unexpected results on occasion.

sin-approximation's People

Contributors

virtuallyaverage 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.