Code Monkey home page Code Monkey logo

vivek3141 / ml Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 3.0 234.93 MB

Easy to use high level python library for popular machine learning algorithms. Has in-built support for graphing and optimizers based in C++.

License: MIT License

Python 71.20% Shell 0.12% Makefile 0.31% C 14.91% C++ 13.46%
machine-learning tensorflow python learn-machine-learning linear-regression neural-network logistic-regression k-means library ml-python convolutional-neural-networks gradient-descent nonlinear-regression

ml's Introduction

Build Test Downloads PyPi Version License

ML

This module provides for the easiest way to implement Machine Learning algorithms. It also has in-built support for graphing and optimizers based in C.

Learn the module here:

This module uses a tensorflow backend.

Implemented Algorithms

  • 2D CNN ml.cnn
  • Basic MLP ml.nn
  • K-Means ml.k_means
  • Linear Regression ml.linear_regression
    • optimized with C
  • Logistic Regression ml.logistic_regression
  • Graph Modules ml.graph
    • Graph any function with or without data points - from ml.graph import graph_function, graph_function_and_data
  • Nonlinear Regression ml.regression
  • Optimizers - ml.optimizer optimized with C
    • GradientDescentOptimizer - from ml.optimizer import GradientDescentOptimizer
    • AdamOptimizer - from ml.optimizer import AdamOptimizer
  • UNSTABLE - Character generating RNN - ml.rnn

You can find examples for all of these in /examples

Pip installation

pip install ml-python

Python installation

git clone https://github.com/vivek3141/ml
cd ml
python setup.py install

Bash Installation

git clone https://github.com/vivek3141/ml
cd ml
sudo make install

Examples

Examples for all implemented structures can be found in /examples.
In this example, linear regression is used.

First, import the required modules.

import numpy as np
from ml.linear_regression import LinearRegression

Then make the required object

l = LinearRegression()

This code below randomly generates 50 data points from 0 to 10 for us to run linear regression on.

# Randomly generating the data and converting the list to int
x = np.array(list(map(int, 10*np.random.random(50))))
y = np.array(list(map(int, 10*np.random.random(50))))

Lastly, train it. Set graph=True to visualize the dataset and the model.

l.fit(data=x, labels=y, graph=True)

Linear Regression

The full code can be found in /examples/linear_regression.py

Makefile

A Makefile is included for easy installation.
To install using make run

sudo make

Note: Superuser privileges are only required if python is installed at /usr/local/lib

License

All code is available under the MIT License

Contributing

Pull requests are always welcome, so feel free to create one. Please follow the pull request template, so your intention and additions are clear.

Contact

Feel free to contact me by:

ml's People

Contributors

dependabot[bot] avatar vivek3141 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ml's Issues

Add more big brain optimizers

Yo, Vivek, my man.

Might want to add better optimizers than regular gradient descent. We need more dank stuff. Like use the ADAM / ADA optimizers or whatever. It would get the job done a lot faster and nicer.

See what you can do.

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.