Skip to main content

mlkit-learn: lightweight machine learning algorithms for learning.

Project description

mlkit-learn

license pyv pypiv format

mlkit-learn is a lightweight machine learning library designed to be interactive, easy-to-understand, and educational. It implements all of the classic machine learning algorithms from regression to gradient boosting trees. With only two lines of code, users can witness popular Kaggle datasets being preprocessed and predicted in action.

Contents

Nearest Neighbor

Multivariate Linear Regression

Naive Bayes

Decision Tree

Logistic Regression

Install

pip install mklearn

Demo

Nearest Neighbor

Demo

  1. download train.csv and put in the directory of your choosing.
  2. run the following code.
from mklearn import knn
knn.demo(5) # demo(k [the number of nearest neighbour], dir [default: current directory], row [default: first 5000 rows]

Use

KNN Classifier
model = KNNClassifier(k)
model.fit(train_x, train_y)
size = test_x.shape[0]
predictions = []
for i in range(size):
    result = classifier.predict(test_x[i])
    predictions.append(result)
KNN Regressor
model = KNNRegressor(k)
model.fit(train_x, train_y)
size = test_x.shape[0]
predictions = []
for i in range(size):
    result = classifier.predict(test_x[i])
    predictions.append(result)

Multivariate Linear Regression

Demo

  1. download kc_house_data.csv and put in the directory of your choosing.

Naive Bayes

Decision Tree

Logistic Regression

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mklearn, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size mklearn-0.0.5-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mklearn-0.0.5.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page