Skip to content

chenjoshua7/functionApproximation

Repository files navigation

Function Approximation Project

Welcome to the Function Approximation Project! This repository showcases a journey through various methods of approximating functions, from classical Taylor series to modern neural networks. Each step is meticulously crafted to demonstrate different techniques and their effectiveness in approximating functions.

Project Overview

Part 1: Visualizing Function Approximation with Taylor Series

In this part, we visualize how the Taylor series approximates a function with increasing orders. Using my own custom functions, we explore how the approximation improves as we include more terms in the series. The visualizations vividly illustrate the convergence properties of Taylor series and how they approximate the function near the expansion point.

Part 2: Polynomial Terms and Linear Regression

Here, we delve into polynomial regression by creating polynomial terms and using linear regression to approximate derivative coefficients. This part emphasizes the connection between polynomial fitting and numerical differentiation. We demonstrate how polynomial regression can be a powerful tool for function approximation.

Part 3: Neural Networks from Scratch

The final part of the project involves implementing a neural network from scratch using only Numpy. No high-level libraries, no shortcuts – just pure, raw Numpy code! This neural network is trained on polynomial terms to approximate the function, showcasing the power of contemporary machine learning techniques in function approximation.

Highlights

  • Custom Functions: All functions used in the visualizations and computations are crafted by me, ensuring a deep understanding of the underlying processes.
  • Hand-coded Neural Network: The neural network is built entirely from scratch using Numpy. Every single operation, from forward propagation to backpropagation, is coded manually to provide a thorough understanding of neural networks.
  • Visualization: Clear and insightful visualizations that make the concepts come alive, helping to understand the strengths and limitations of each approximation method.

Getting Started

Prerequisites

To run this project, you need Python 3.x and the following libraries:

  • Numpy
  • Matplotlib

Installation

Clone the repository to your local machine:

git clone https://github.com/chenjoshua7/function-approximation-project.git
cd function-approximation-project

About

Neural Network class coded from strach using NumPy and visualized with Matplotlib. Exploration with function approximation.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors