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.

Source Distribution

mklearn-0.0.5.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

mklearn-0.0.5-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page