Code Monkey home page Code Monkey logo

polynomial-regressor's Introduction

Polynomial-Regressor


v1.5 is more reliable than the others.

Purpose:

This is a custom function regressor or curve fitter algorithm using least squares optimisation technique.

Prerequisites:

Python. A csv file ending with an 'eof' character.

Usage:

type your function inside the custom() function block where w[0] is the first parameter,w[1] is the second parameter etc. set the weights variable to the no. of parameters your function contains. execute the script in your python installed computer. provide the csv data file's name or location. Output will be the paramter array which contains the best fit paramter values for the given data.

Examples for using a custom function inside the script:

for a linear function having 2 parameters:-

def custom(x,w): //for now dont care what x and w are.

return w[0]*x+w[1] //in other words, return ax+b where a is w[0],b is w[1]

For a sine() function having 4 paramters:-

def custom(x,w): return x[0]*sin(w[1]*x+w[2])+w[3]

Finally before the custom() function there is a weights variable. For 1st example set:-

weights=2

For 2nd example:-

weights=4

polynomial-regressor's People

Contributors

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