GithubHelp home page GithubHelp logo

masterk0927 / machinelearninginc Goto Github PK

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

Just figuring out how hard is it to do Machine Learning in a Low Level language like C.

Shell 1.23% C 96.05% TeX 2.72%

machinelearninginc's Introduction

Machine Learning in C

This repository explores the challenges and possibilities of implementing machine learning algorithms in the C programming language. The goal is to understand the intricacies of machine learning in a low-level language and explore the performance trade-offs.

1: [Logic Gates modelling (AND,OR,NAND,XOR) and Number Prediction]

P1

Single neuron and single input based number predictor.

P2:

In the context of machine learning, logic gates can be modeled as binary classification problems. A logic gate takes one or more binary inputs and produces a binary output based on a predefined logic function.

Linearly separable logic gates, such as AND and OR gates, can be easily modeled using a single-layer perceptron. The perceptron learns the weights and biases that allow it to separate the input space into two distinct regions, corresponding to the two possible output values. The training process involves adjusting the weights and biases based on the error between the predicted output and the desired output.

Non-linearly separable logic gates, such as NAND and XOR gates, require more complex models like multi-layer perceptrons (neural networks) to accurately represent their behavior. Neural networks consist of multiple layers of interconnected neurons, each performing a weighted sum of inputs followed by a non-linear activation function. The network learns the optimal weights and biases through a process called backpropagation, which adjusts the parameters to minimize the prediction error.

The main problem with the single layer XOR gate model is that it will not reduce the cost function effectively and will becoeme stable around the cost function of 2.24, which is high. So to remove that complexity, we model it using multiple Neurons.

2: [Franework for Neural Networks in C]

P1

Coded a header file aka framework in C for implementing the neural network easily and effectively, removing the need to hard coding various memory allocation stuffs.

P2

Porting the whole XOR model (which was the complicated 9 parameters model) into this framework, for testing the framework.

machinelearninginc's People

Contributors

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