Giter VIP home page Giter VIP logo

mlmodels's Introduction

mlmodels

Numpy implementations of basic ML algorithms.

Currently implemented:

  • Linear regression (least squares)
  • Bayesian linear regression
  • Logistic regression
  • Neural networks

Also includes polynomial and radial basis functions.

TODO:

  • k-means
  • k-NN (+ PCA for low dimensional embedding before k-NN)
  • Gaussian processes (with basic covariance functions like squared exponential).

Examples

Linear regression with polynomial basis funtions

regressor = LeastSquaresRegressor(scalar_polynomial, 4)
regressor.fit(X, y, visualise=True)

drawing

Bayesian linear regression with polynomial basis functions

bayes_regressor = BayesianLinearRegressor(0.1, noise_var, scalar_polynomial, 4)
bayes_regressor.compute_posterior(X, y, visualise=True)

drawing

Logistic Regression with radial basis functions

log_res = LogisticRegressor(gaussian_rbf, X, 0.2)
log_res.fit(X_train, y_train, 0.005, 100, 64, X_val, y_val, visualise_training=True) drawing drawing

Neural Network with sigmoid activation functions

nn = NeuralNetwork(X.shape[1], [8, 8], ['sigmoid', 'sigmoid'], 'sigmoid')
nn.fit(X_train, y_train, 0.005, 8000, 16, X_val, y_val, 16, 'binary_crossentropy', visualise_training=True, save_name=None, display_metrics=True, compute_accuracy=True) drawing drawing

Neural Network with relu activation functions

nn = NeuralNetwork(X.shape[1], [8, 8], ['relu', 'relu'], 'sigmoid')
nn.fit(X_train, y_train, 0.005, 8000, 16, X_val, y_val, 16, 'binary_crossentropy', visualise_training=True, save_name=None, display_metrics=True, compute_accuracy=True) drawing drawing

mlmodels's People

Contributors

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