/CodeExamples

We have put together some examples of different well known machine learning algorithms. This is to make it easier to understand how it looks like when working with machine learning in code. Happy hacking!

Primary LanguagePython

PerceptiLabs Machine Learning CodeExamples

We have put together code examples for some of the well-known machine learning algorithms discussed in our Machine Learning Handbook. The handbook is a free resource that you can download and use to become more familiar with approaches like linear regression, decision trees, k-nearest neighbor, support vector machines (SVMs), clustering, and of course, neural networks. The handbook goes into the architecture and math behind these powerful algorithms.

We provide Python examples for the following machine learning algorithms in this repo:

Happy hacking!

Neural Network

Play around with this code if you want to understand how to build neural networks using NumPy.

This is a great way to better understand how it works when training a neural network.

In this example we are using the MNIST Dataset, which is a dataset containing image data of handwritten digits ranging from 0 through 9.

Note that each sample has a corresponding label.

K-means

Use K-means clustering in its most common form, with seeding and/or constraints.

In this code example we are using the IRIS dataset, which is easy to play around with for this task.

Decision Tree Classification

You can use decision trees for classification, using the Gini index for the split.

In this code example we are using the Bank Dataset (data_banknote_authentication.csv, which can easily be replaced with another dataset.

Linear Regression

Here we are providing three different versions of linear regression:

  1. Simple Linear Regression
  2. Simple Linear Regression using SGD
  3. Multi-variable Linear Regression using SGD

In this example we are using the Insurance Dataset (insurance.csv) for 1., Wine Dataset for 2. and ex1data1 Dataset for 3.

Community

Got questions, feedback, or want to join a community of machine learning practitioners working with exciting tools and projects? Check out our Community page!