A high level API that implements common Machine Learning algorithms from scratch with only numpy
as dependency.
Available Machine Learning Algorithms include:
- Linear Regression
- Logistic Regression
- Support Vector Machine
- KMeans
- Self Organizing Map
- The Perceptron
- Multi-Layer Perceptron (n_layers)
- Convolutional Neural Network
How to use
import numpy as np
from linear_model import LinearRegression
X = np.array([[0, 0, 1], [0, 1, 0], [1, 0, 0], [1, 0, 1]])
y = np.array([[0], [0], [1], [1]])
clf = LinearRegression()
clf.fit(X, y)
y_pred = clf.predict(np.array([[1, 1, 0]]))
print('Prediction: {}'.format(y_pred))
Requirements
Installing numpy
using the Python Package Manager pip
pip install numpy
Installing matplot
using the Python Package Manager pip
to visualize data
pip install matplotlib
Credits