Coder Social home page Coder Social logo

ml-_models-from-scratch's Introduction

Machine Learning Models From Scratch

There are two main goals for this repository. They are:

  • Going deeper into the understanding of the popular machine learning models that are out there.
  • Revising the underlying concept on how this models work.

A man who truly understands can implement!

Dependencies

Numpy is the most essential tool that will be used. To get it up and running:

# if installed already on the machine. If ModuleNotFoundError comes up then you would have to intall it.
import numpy as np

#If not already installed, on your terminal, input the command below.
pip install numpy

I would be using the visual studio code IDE to carry out this project, although anyone of your choosing is most welcome.

The first model would be the K-Nearest Neighbours which can be found in the K-Nearest Neighbors The K-Nearest Neighbor is best described with the familiar quote "Birds of the same feathers flock together". It is a supervised machine learning algorithm that can be used for classification problems as well as regression problems. Euclidean distances between test data points and training data points are calculated and the ones which are closest are used. A diagram explaining the concept is below!


KNN.jpg


The second model would be the Simple Linear Regression which can be found in the Linear Regression The Simple linear regression is an easy model. It is governed by the equation below:

Linear Regression Image

The model works because of the gradient descent algorithm which helps it updates the weights and biases that in turns helps the model to reduce the error.

Gradient Descent


This function is much like the linear regression function. The difference is that the logistic regression is for classification problems. Usually used for the binary classification where there are only two possibilities of actions to choose from.

It uses the linear function Y = Wx + b, but then goes on to be passed through the sigmoid activation function. After which gradient descent is performed to update the weigths and biases.

The image below shows the distinction between the two functions (Linear regression and Logistic Regression)

Logistic Regression vs Linear Regression


The next model is the Naive Bayes which can be found in the Naive Bayes The formula employed in building it is below:

Naive Bayes


The next model is the Perceptron a.k.a the single layered neural network. The process implemented can be summed up in the image below.

perceptron_image


The next model is the Support Vector Machine a.k.a SVM

SVM

ml-_models-from-scratch's People

Contributors

ajibolamatthew1 avatar

Stargazers

 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.