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 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page